SA-MP Forums Archive
i need help with a /spectate command - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: i need help with a /spectate command (/showthread.php?tid=263800)



i need help with a /spectate command - X-Pert07 - 23.06.2011

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. ^.^


Re: i need help with a /spectate command - iShnizeL - 23.06.2011

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.


Re: i need help with a /spectate command - Gazmull - 23.06.2011

In sa-mp server package, you'll see a "adminspec" file then open it.