i need help with a /spectate command
#2

Hey,
The Spectate command working with the function "PlayerSpectatePlayer" or "PlayerSpectateVehicle".
There is a basic Spectate command:
PHP код:
   if(strcmp(cmd,"/Spectate"true) ==0)
     {
     new 
id[256];
     
id strtok(cmdtextidx);
     if(!
strlen(id)) return SendClientMessage(playeridYELLOW,"USAGE: /Spectate [ID]");
     if(!
IsPlayerConnected(strval(id))) return SendClientMessage(playeridYELLOW,"Error: Invalid ID");
     
TogglePlayerSpectating(playerid1);
     
PlayerSpectatePlayer(playeridstrval(id));
     return 
1;
     } 
Enjoy.
Reply


Messages In This Thread
i need help with a /spectate command - by X-Pert07 - 23.06.2011, 14:30
Re: i need help with a /spectate command - by iShnizeL - 23.06.2011, 15:20
Re: i need help with a /spectate command - by Gazmull - 23.06.2011, 15:36

Forum Jump:


Users browsing this thread: 1 Guest(s)