SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Tutorials

Reply
 
Thread Tools Display Modes
Old 31/10/2010, 11:26 AM   #11
Meinstad
Gangsta
 
Meinstad's Avatar
 
Join Date: Sep 2010
Location: Northpole
Posts: 649
Reputation: 31
Default Re: How to make /enter command with text tht shows up

my /enter do not work
Here is my pwn: http://www.sendspace.com/file/jrkh9g


Please help me!
Meinstad is offline   Reply With Quote
Old 31/10/2010, 03:54 PM   #12
Miado_Hulk
Big Clucker
 
Miado_Hulk's Avatar
 
Join Date: Jun 2010
Location: Well,Guess what? what? in my house xD
Posts: 183
Reputation: 1
Smile Re: How to make /enter command with text tht shows up

lol with my small knowledge about pawn i have find a mistake a big mistake when the player enter you should add a SetPlayerInterior to set the player interior or he will jump in the air after entering and the same in /exit you should add a SetPlayerInterior(playerid, 0); so he will back to the normal interior
thanks for reading and hopefully you will correct it !!
Miado_Hulk is offline   Reply With Quote
Old 09/01/2011, 01:47 AM   #13
Sexserghy
Big Clucker
 
Sexserghy's Avatar
 
Join Date: Jan 2011
Posts: 59
Reputation: 3
Default Re: How to make /enter command with text tht shows up

This tutorial = -0
Sexserghy is offline   Reply With Quote
Old 25/04/2011, 11:36 PM   #14
Aizen
Big Clucker
 
Join Date: Apr 2011
Posts: 102
Reputation: 0
Default Re: How to make /enter command with text tht shows up

Where place DisableInteriorEnterExits();,under GameModeinit?
__________________
Aizen is offline   Reply With Quote
Old 26/04/2011, 02:31 AM   #15
Aizen
Big Clucker
 
Join Date: Apr 2011
Posts: 102
Reputation: 0
Default Re: How to make /enter command with text tht shows up

Where to put DisableInteriorEnterExits();?
__________________
Aizen is offline   Reply With Quote
Old 26/04/2011, 02:34 AM   #16
Emmet_
High-roller
 
Join Date: Dec 2009
Posts: 1,936
Reputation: 891
Default Re: How to make /enter command with text tht shows up

Quote:
Originally Posted by Aizen View Post
Where to put DisableInteriorEnterExits();?
OnGameModeInit
Emmet_ is offline   Reply With Quote
Old 26/04/2011, 03:12 AM   #17
Aizen
Big Clucker
 
Join Date: Apr 2011
Posts: 102
Reputation: 0
Default Re: How to make /enter command with text tht shows up

/enter not work man -_-
__________________
Aizen is offline   Reply With Quote
Old 26/04/2011, 10:29 AM   #18
Dino Bloomer
Big Clucker
 
Join Date: Apr 2010
Posts: 70
Reputation: 0
Default Re: How to make /enter command with text tht shows up

nice thanks to this tutorial
__________________
SoRrY FoR My BaD EngLisH !
Dino Bloomer is offline   Reply With Quote
Old 27/04/2011, 12:10 AM   #19
Aizen
Big Clucker
 
Join Date: Apr 2011
Posts: 102
Reputation: 0
Default Re: How to make /enter command with text tht shows up

Well i follow you code but cant /enter ,this is my code:

Code:
#include <a_samp>
new driving;

public OnGameModeInit()
{
    DisableInteriorEnterExits();
	driving = CreatePickup(1239,1,2045.5084228516,-1908.2283935547,12.99134349823);
	
    return 1;
}

 public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/enter",cmdtext,true,6) == 0)
		{
	    	if(IsPlayerInRangeOfPoint(playerid,10,2045.5084228516,-1908.2283935547,12.99134349823))
			{
				SetPlayerPos(playerid,1299.14,-794.77,1084.00);
				
				
				return 1;
			}
		}
    if (strcmp("/exit",cmdtext,true,6) == 0)
		{
	    	if(IsPlayerInRangeOfPoint(playerid,10,1299.14,-794.77,1084.00))
			{
				SetPlayerPos(playerid,2045.5084228516,-1908.2283935547,12.99134349823);
				return 1;
			}
		}
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == driving)
        {
        GameTextForPlayer(playerid,"~r~ /enter ~y~ to enter this building",3000,1);
        }
__________________
Aizen is offline   Reply With Quote
Old 27/04/2011, 05:22 PM   #20
Mean
Banned
 
Join Date: Jul 2010
Location: 14th annual lemon party
Posts: 2,892
Reputation: 229
Default Re: How to make /enter command with text tht shows up

HOW it doesn't work, what's the problem, does it teleport you wrongly or? We can't just know, we aren't telepaths.

EDIT: Your OnPlayerCommandText is wrong,

Use:
pawn Code:
#include < a_samp >
new driving;

public OnGameModeInit()
{
    DisableInteriorEnterExits( );
    driving = CreatePickup( 1239,1,2045.5084228516,-1908.2283935547,12.99134349823 );
    return 1;
}

public OnPlayerCommandText( playerid, cmdtext[ ] )
{
    if( !strcmp( "/enter", cmdtext, true, 6 ) )
    {
        if( IsPlayerInRangeOfPoint( playerid,10,2045.5084228516,-1908.2283935547,12.99134349823 ) )
        {
            SetPlayerPos( playerid,1299.14,-794.77,1084.00 );  
            return 1;
        }
    }
    if( !strcmp( "/exit",cmdtext,true,5 ) )
    {
        if( IsPlayerInRangeOfPoint( playerid,10,1299.14,-794.77,1084.00 ) )
        {
            SetPlayerPos( playerid,2045.5084228516,-1908.2283935547,12.99134349823 );
            return 1;
        }
    }
    return 0;
}
public OnPlayerPickUpPickup( playerid, pickupid )
{
    if( pickupid == driving )
    {
        GameTextForPlayer( playerid,"~r~ /enter ~y~ to enter this building",3000,1 );
    }
    return 1;
}
You can't just copy-paste the code!

EDIT: Actually almost everything was wrong...
Mean is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 06:40 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.