26.12.2012, 20:10
command for spectate:
how it look: http://i.imgur.com/oTQy8.png
Код:
CMD:recon(playerid, params[]) { new id, string[128]; if(PlayerInfo[playerid][pAdmin] < 2)return SendClientMessage(playerid, COLOR_WHITE, "Niste ovlasteni"); if(sscanf(params, "u", id)) return SendClientMessage(playerid, COLOR_WHITE, "/recon [playerid]"); else if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_WHITE, "Pogresan ID"); TogglePlayerSpectating(playerid, 1); PlayerSpectatePlayer(playerid, id); SetPlayerInterior(playerid, GetPlayerInterior(id)); if(IsPlayerInAnyVehicle(playerid)) { new specvehicleid; if(specvehicleid < MAX_VEHICLES) TogglePlayerSpectating(playerid, 1); PlayerSpectateVehicle(playerid, specvehicleid); } format(string, sizeof(string), "Sada reconas %s, da ga prestanes reconat koristi: /uncon", PlayerName(id)); SendClientMessage(playerid, Grey, string); return 1; }