i need help with a /spectate command
#1

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. ^.^
Reply
#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
#3

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


Forum Jump:


Users browsing this thread: 1 Guest(s)