14.01.2013, 22:10
Tenta ae
PHP код:
CMD:espiar(playerid, params[])
{
new giverid;
if(PlayerInfo[playerid][pAdmin] < 1000) return SendClientMessage(playerid, VERMELHO_ESCURO, "[ x ] Vocк nгo tem Autorizaзгo.");
if(sscanf(params, "u", giverid)) return SendClientMessage(playerid, VERMELHO_ESCURO, "[ x ] Use /espiar [ ID ]");
MinhaSkin[playerid] = GetPlayerSkin(playerid);
MeuMundoVirtual[playerid] = GetPlayerVirtualWorld(playerid);
Interior[playerid] = GetPlayerInterior(playerid);
PlayerEspiado[playerid] = giverid;
PlayerInfo[playerid][Assistindo] = true;
SendClientMessage(playerid, VERMELHO_ESCURO, "[ x ] {FFFFFF}Para parar de espiar use {FF0000}/espiaroff");
if(IsPlayerInAnyVehicle(giverid))
{
TogglePlayerSpectating(playerid, 1);
PlayerSpectateVehicle(playerid, GetPlayerVehicleID(giverid));
gSpectateType[playerid] = ADMIN_SPEC_TYPE_VEHICLE;
SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(giverid));
SetPlayerInterior(playerid, GetPlayerInterior(giverid));
}
else
{
PlayerSpectatePlayer(playerid, giverid);
TogglePlayerSpectating(playerid, 1);
gSpectateType[playerid] = ADMIN_SPEC_TYPE_PLAYER;
SetPlayerInterior(playerid, GetPlayerInterior(giverid));
}
return 1;
}