Work /spec on 0.3x?
#1

Hello, i would ask if /spec work on 0.3x cause i tried every Methods but the Admin die when he use /spec, and i dont know why. So work /spec on 0.3x?
Reply
#2

Yes it does.
Reply
#3

Maybe your coding is incorrect, please show us..
Reply
#4

Theres no command like /Spec as default in samp folder. You need a Spectate script which you must confirm that its compiled correctly, added in Gamemode / Filterscript section and Running after launching server.cfg.

Or just show your code please.. ^^
Reply
#5

Код:
COMMAND:spec(playerid,params[])
{
        if(pInfo[playerid][pAdminLevel] >= 1)
    {
	new id;
	if(sscanf(params,"d",id)) return SendClientMessage(playerid,-1,""chat""COL_YELLOW" Usage: /sped <id>");
	if(!IsPlayerConnected(id)) return SendClientMessage(playerid,-1,""chat""COL_RED" Player is not connected!");

	TogglePlayerSpectating(playerid,1);
    PlayerSpectatePlayer(playerid,id);
    SetPlayerInterior(playerid,GetPlayerInterior(id));
 	}
	else {
		SendClientMessage(playerid,-1,""chat""COL_RED" You do not have the right admin permissions for this command!");
	}
	return 1;
}

COMMAND:specoff(playerid,params[])
{
        if(pInfo[playerid][pAdminLevel] >= 1)
    {

      TogglePlayerSpectating(playerid,0);
    	}
	else {
		SendClientMessage(playerid,-1,""chat""COL_RED" You do not have the right admin permissions for this command!");
	}
	return 1;
}
It working only on 1 Gamemode i've created in the others i have always this bug that the admin dieng when he use the command.
Reply
#6

Hello? someone?
Reply
#7

Change your sscanf specifier from "d" to "u". This is because u is used for players, d and i are for general integers
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)