Need help with goto Command
#6

pawn Code:
COMMAND:goto(playerid, params[])
{
    new Target;
    if(!sscanf(params, "i", Target))
    {
        if(Target == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, "This player is not connected!");
        if(IsPlayerInAnyVehicle(playerid))
        {
            new Float:pos[3];
            GetVehiclePos(GetPlayerVehicleID(Target), pos[0], pos[1], pos[2]);
            SetVehiclePos(GetPlayerVehicleID(playerid), pos[0], pos[1], pos[2]);
        } else {
            new Float:pos[3];
            GetPlayerPos(Target, pos[0], pos[1], pos[2]);
            SetPlayerPos(playerid, pos[0], pos[1], pos[2]);
        }
    } else return SendClientMessage(playerid, -1, "Usage: /goto [playerid]");
    return 1;
}
Try this one
Reply


Messages In This Thread
Need help with goto Command - by mrsamp - 17.08.2011, 16:32
Re: Need help with goto Command - by [OC]Zero - 17.08.2011, 16:36
Re: Need help with goto Command - by mrsamp - 17.08.2011, 16:41
Re: Need help with goto Command - by [OC]Zero - 17.08.2011, 16:43
Re: Need help with goto Command - by mrsamp - 18.08.2011, 14:19
Re: Need help with goto Command - by Wesley221 - 18.08.2011, 14:45
Re: Need help with goto Command - by mrsamp - 18.08.2011, 14:47

Forum Jump:


Users browsing this thread: 3 Guest(s)