How can I do this ?
#8

If you want ...

PHP код:
public OnPlayerCommandText(playeridcmdtext[])
{
    if(
strcmp(cmdtext"/savex"true) == 0)
    {
        
SendClientMessage(playerid0xFFFF00FF"Positions saved.");
        new 
Float:Pos[3];
        
GetPlayerPos(playeridPos[0], Pos[1], Pos[2]);
        
SetPVarFloat(playerid"X"Pos[0]);
        
SetPVarFloat(playerid"Y"Pos[1]);
        
SetPVarFloat(playerid"Z"Pos[2]);
        
SetPVarInt(playerid"Int"GetPlayerInterior(playerid));
        return 
1;
    }
    if(
strcmp(cmdtext"/go"true) == 0)
    {
        if(
GetPVarType(playerid"X") == 0)
            return 
SendClientMessage(playerid0xFF0000FF"No positions saved.");
        
SendClientMessage(playerid0xFFFF00FF"Teleported.");
        
SetPlayerPos(playeridGetPVarFloat(playerid"X"), GetPVarFloat(playerid"Y"), GetPVarFloat(playerid"Z"));
        
SetPlayerInterior(playeridGetPVarInt(playerid"Interior"));
        return 
1;
    }
    return 
0;

Reply


Messages In This Thread
How can I do this ? - by Jay. - 28.06.2011, 15:24
Re: How can I do this ? - by Laronic - 28.06.2011, 15:28
Re: How can I do this ? - by Jay. - 28.06.2011, 15:30
Re: How can I do this ? - by Laronic - 28.06.2011, 15:32
Re: How can I do this ? - by Shadoww5 - 28.06.2011, 15:33
Re: How can I do this ? - by CrazyBlob - 28.06.2011, 15:43
Re: How can I do this ? - by Mauzen - 28.06.2011, 17:08
Re: How can I do this ? - by Shadoww5 - 28.06.2011, 17:22

Forum Jump:


Users browsing this thread: 2 Guest(s)