17.12.2013, 22:03
Do you mean ZCMD?
here you go:
here you go:
pawn Код:
CMD:spec(playerid,params[])
{
if(IsPlayerAdmin(playerid))
{
new id;
if(sscanf(params,"u",id))return SendClientMessage(playerid,0xFF0000FF,"Usage: /spec[ID]");
if(!IsPlayerConnected(id))return SendClientMessage(playerid,0xFF0000FF,"Player ID/Name not found!");
if(id == playerid)return SendClientMessage(playerid,0xFF0000FF,"You can't spectate yourself!");
if(id == INVALID_PLAYER_ID)return SendClientMessage(playerid,0xFF0000FF,"Invalid PlayerID!");
new string[64],name[24];
GetPlayerName(id,name,24);
SetPlayerInterior(playerid,GetPlayerInterior(id));
TogglePlayerSpectating(playerid,true);
PlayerSpectatePlayer(playerid,id);
format(string,sizeof(string),"You are now spectating player: %s",name);
SendClientMessage(playerid,0xFF0000FF,string);
}else return SendClientMessage(playerid, 0xFF0000FF, "You are not an admin!");
return 1;
}
CMD:specoff(playerid,params[])
{
#pragma unused params
if(IsPlayerAdmin(playerid))
{
TogglePlayerSpectating(playerid,false);
SetCameraBehindPlayer(playerid);
SendClientMessage(playerid,0xFF0000FF,"You have turned the spectating mode off.");
}else return SendClientMessage(playerid, 0xFF0000FF, "You are not an admin!");
return 1;
}