[Ajuda] Comando /ir
#3

pawn Код:
CMD:ir(playerid, params[])
{
    new ID;
    if(Player[playerid][pAdmin] >= 1) return SendClientMessage(playerid, COR_ERRO, "Vocк nгo tem permissгo para usar este comando!");
    if(sscanf(params, "u",ID))
    return SendClientMessage(playerid,-1,"Use: /ir [id]");

    if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, COR_ERRO, "ERRO: ID invбlido.");

    new Float:plocx,Float:plocy,Float:plocz;
    GetPlayerPos(ID, plocx, plocy, plocz);
    new intid = GetPlayerInterior(ID);
    SetPlayerInterior(playerid,intid);
    new world = GetPlayerVirtualWorld(ID);
    SetPlayerVirtualWorld(playerid, world);

    if (GetPlayerState(playerid) == 2)
    {
        new tmpcar = GetPlayerVehicleID(playerid);
        SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
    }
    else
    {
        SetPlayerPos(playerid,plocx,plocy+2, plocz);
    }
    return 1;
}
Reply


Messages In This Thread
Comando /ir - by _Play_ - 10.12.2014, 20:11
Re: Comando /ir - by MultiKill - 10.12.2014, 20:16
Re: Comando /ir - by Whoo - 10.12.2014, 20:16
Re: Comando /ir - by _Play_ - 10.12.2014, 20:21

Forum Jump:


Users browsing this thread: 1 Guest(s)