Need help with /goto command
#2

1. Hi Jermi
2. For RCON Admins. When you script an admin system, replace IsPlayerAdmin with your administrative check.
pawn Код:
CMD:goto(playerid, params[])
{
    new targetid;
    if(IsPlayerAdmin(playerid))
    {
        if(sscanf(params, "u", targetid) == 0)
        {
            new CurrInt = GetPlayerInterior(targetid);
            if(targetid == INVALID_PLAYER_ID)
            {
                SendClientMessage(playerid, 0xFFFFFFFF, "Error - Player specified is not connected.");
                return 1;
            }
            new Float:X, Float:Y, Float:Z;
            GetPlayerPos(targetid, X, Y, Z);
            SetPlayerInterior(playerid, CurrInt);
            if(GetPlayerState(playerid) == 2)
            {
                new CurrentVehicle = GetPlayerVehicleID(playerid);
                SetVehiclePos(CurrentVehicle, X, Y + 4, Z);
            }
            else
            {
                SetPlayerPos(playerid, X, Y + 1, Z);
            }
        }
        else
        {
            SendClientMessage(playerid, 0xFFFFFFFF, "USAGE: /Goto {FFFF00}[PlayerID/PartOfName]");
        }
    }
    return 1;
}
Reply


Messages In This Thread
Need help with /goto command - by Jermi - 18.02.2012, 20:34
Re: Need help with /goto command - by Rob_Maate - 18.02.2012, 20:41
Re: Need help with /goto command - by ReneG - 18.02.2012, 20:42
Re: Need help with /goto command - by Jermi - 18.02.2012, 20:59
Re: Need help with /goto command - by Rob_Maate - 18.02.2012, 21:32
Re: Need help with /goto command - by Lordzy - 26.03.2012, 13:57
Re: Need help with /goto command - by diehard5225 - 15.04.2012, 22:42
Re: Need help with /goto command - by [LB]BlAcK_DeViL - 26.08.2012, 06:21

Forum Jump:


Users browsing this thread: 1 Guest(s)