Spectate Script not working -
SplinteX - 17.12.2013
Hello!
I just downloaded that spectate filterscript :
https://sampforum.blast.hk/showthread.php?tid=127354
and its not working ,i compiled to .amx file and i placed it fs folder and added SpecFS to filterscript line in server.cfg but when I type /spec in server it says SERVER: Unknown Command.Can someone fix it maybe?
Re: Spectate Script not working -
jakejohnsonusa - 17.12.2013
Did it load up in the server log?
Re: Spectate Script not working -
SplinteX - 17.12.2013
It loaded FS:
[22:51:22] Filterscripts
[22:51:22] ---------------
[22:51:22] Loading filterscript 'motd.amx'...
[22:51:22]
--------------------------------------
[22:51:22] Textdraw MOTD (Message Of The Day) by AiRa LoKa
[22:51:22] --------------------------------------
[22:51:22] Loading filterscript 'SpecFS.amx'...
[22:51:22] Loaded 2 filterscripts.
I Got only 2 FS
Re: Spectate Script not working -
SplinteX - 17.12.2013
Please someone give me script/FS for the admin spectating mode (/spec and /specoff).I need it immediatly.
Re: Spectate Script not working -
BlackWolf120 - 17.12.2013
hi,
actually you can find this kind of commands in every admin FS but here is a raw command structure that might help you for the start
pawn Код:
//OnPlayerCommandText(Performed)
dcmd(spec,4,cmdtext);
dcmd(specoff,7,cmdtext);
//Commands using dcmd and sscanf (required includes!)
dcmd_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;
}
dcmd_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;
}
Is that the kind of commands you have requested?
Re: Spectate Script not working -
SplinteX - 17.12.2013
Yes,but I dont use dcmd.I use CMD (CMD: spec,CMD: specoff).Could you please make that script in CMD,because i dont know how to do it?
Thanks
Re: Spectate Script not working -
BlackWolf120 - 17.12.2013
Do you mean ZCMD?
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;
}
Re: Spectate Script not working -
SplinteX - 18.12.2013
Thanks a lot