10.12.2014, 20:11
eu uso /ir e altomaticamente eu venho ate eu mesmo ID 0 em vez de apareзer SendClientMessage(playerid,-1,"Use: /ir [id]");
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))
{
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;
}