problem with goto
#9

This might help...

pawn Код:
COMMAND:get(playerid, params[])
{
    new id, Float:Pos[3];
    if(sscanf(params, "u", id)) return SendClientMessage(playerid, -1, "USAGE: /get [playerid]");
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "ERROR: That player isn't connected.");
    if(PlayerData[playerid][IsAdmin])
    {
        GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
        new int = GetPlayerInterior(playerid);
        if(GetPlayerState(id) == PLAYER_STATE_ONFOOT)
        {
            SetPlayerPos(id, Pos[0], Pos[1], Pos[2]);
            SetPlayerInterior(id, int);
        }
        if(IsPlayerInAnyVehicle(id) && GetPlayerState(id) == PLAYER_STATE_DRIVER)
        {
            new veh = GetPlayerVehicleID(id);
            new interior = GetPlayerInterior(playerid);
            SetVehiclePos(veh, x+5, y, z);
            SetPlayerInterior(id, interior);
            PutPlayerInVehicle(id, veh, 0);
        }
        SendClientMessage(playerid, -1, "You've teleported a player.");
        SendClientMessage(id, -1, "You've been teleported.");
    }
    else {
        SendClientMessage(playerid, -1, "You aren't admin!");
    }
    return 1;
}
Reply


Messages In This Thread
problem with goto - by tanush - 02.03.2011, 20:14
Re: problem with goto - by Antonio [G-RP] - 02.03.2011, 20:58
Re: problem with goto - by Steven82 - 02.03.2011, 21:05
Re: problem with goto - by Antonio [G-RP] - 02.03.2011, 21:07
Re: problem with goto - by tanush - 02.03.2011, 21:16
Re: problem with goto - by tanush - 02.03.2011, 21:20
Re: problem with goto - by admantis - 02.03.2011, 21:45
Re: problem with goto - by tanush - 02.03.2011, 21:53
Re: problem with goto - by Antonio [G-RP] - 02.03.2011, 21:55

Forum Jump:


Users browsing this thread: 5 Guest(s)