23.06.2011, 14:30
hello . im in need of a /spectate command, but i dont know how to make it .. could someone help me with it?..please? ill be happyjoy if you did. ^.^
if(strcmp(cmd,"/Spectate", true) ==0)
{
new id[256];
id = strtok(cmdtext, idx);
if(!strlen(id)) return SendClientMessage(playerid, YELLOW,"USAGE: /Spectate [ID]");
if(!IsPlayerConnected(strval(id))) return SendClientMessage(playerid, YELLOW,"Error: Invalid ID");
TogglePlayerSpectating(playerid, 1);
PlayerSpectatePlayer(playerid, strval(id));
return 1;
}