Interior Help - Gang Server
#4

Wrong man, you should put it inside of a command. For example:

PHP код:
public OnPlayerCommandText(playeridcmdtext[])
{
    if (
strcmp("/tpme"cmdtexttrue5) == 0)
    {
        
SetPlayerInterior(playerid15);
        
SetPlayerPos(playerid2220.26, -1148.011025.80);
        
SendClientMessage(playerid, -1"Teleported!");
        return 
1;
    }
    return 
0;

EDIT:

Command for getting our of the Interior(15):

PHP код:
public OnPlayerCommandText(playeridcmdtext[])
{
    if (
strcmp("/tpme"cmdtexttrue5) == 0)
    {
        
SetPlayerInterior(playerid15);//Setting the player's Interior to 15 so the Motel can be visible.
        
SetPlayerPos(playerid2220.26, -1148.011025.80);//Teleporting the player to the Motel's Pos.
        
SendClientMessage(playerid, -1"Teleported!");//Sending the player a message.
        
return 1;
    }
    if(
strcmp("/getmeout"cmdtexttrue9) == 0)
    {
        
SetPlayerInterior(playerid0);//Setting the player's Interior to 0(default one).
        
SetPlayerHealth(playerid0);//Setting the player's health to 0. Which will obviously kill him.
        
SendClientMessage(playerid, -1"Done..");//Sending him a message saying that the command did what it was ment to do :p..
        
return 1;
    }
    return 
0;

Reply


Messages In This Thread
Interior Help - Gang Server - by nicholas1 - 28.10.2012, 17:06
Re: Interior Help - Gang Server - by gtakillerIV - 28.10.2012, 17:12
Re: Interior Help - Gang Server - by nicholas1 - 28.10.2012, 17:14
Re: Interior Help - Gang Server - by gtakillerIV - 28.10.2012, 17:16
Re: Interior Help - Gang Server - by nicholas1 - 28.10.2012, 17:19
Re: Interior Help - Gang Server - by MarTaTa - 28.10.2012, 17:20
Re: Interior Help - Gang Server - by gtakillerIV - 28.10.2012, 17:22
Re: Interior Help - Gang Server - by nicholas1 - 28.10.2012, 17:33
Re: Interior Help - Gang Server - by nicholas1 - 28.10.2012, 17:35
Re: Interior Help - Gang Server - by gtakillerIV - 28.10.2012, 17:36

Forum Jump:


Users browsing this thread: 1 Guest(s)