Commands not working properly
#7

Код:
public OnPlayerConnect(playerid)
{
	gPlayer_Duty[playerid] = 1;
	}
	CMD:aod(pid,params[])
	{
		if(!IsPlayerAdmin(pid)) return SCM(pid, COLOR_RED, ADMIN_MESSAGE);
	
		new aod[65], name[MAX_PLAYER_NAME];
		GetPlayerName(pid, name, MAX_PLAYER_NAME);

		if(!gPlayer_Duty[playerid])
		{
		    SPH(pid, 99999);
			SetPlayerArmour(pid, 100);
	
			format(aod, sizeof aod, "Admin %s is now on duty. Use /report for any assistance.", name);
			SCMToAll(COLOR_LIME, aod);
			
			gPlayer_Duty[playerid] = 1;
		}
		else
		{
		    SPH(pid, 100);
		    SetPlayerArmour(pid, 0);
		}
		format(aod, sizeof aod, "Admin %s is no longer on duty.", name);
		SCMToAll(COLOR_BLUE, aod);

		gPlayer_Duty[playerid] = 0;

		}
		return 1;
	}
}
Код:
C:\Users\Marius\Desktop\GM\gamemodes\GM.pwn(389) : error 021: symbol already defined: "OnPlayerConnect"
C:\Users\Marius\Desktop\GM\gamemodes\GM.pwn(391) : warning 209: function "OnPlayerConnect" should return a value
C:\Users\Marius\Desktop\GM\gamemodes\GM.pwn(419) : warning 209: function "cmd_aod" should return a value
C:\Users\Marius\Desktop\GM\gamemodes\GM.pwn(420) : error 010: invalid function or declaration
the global was supposed to be gPlayer_Duty[MAX_PLAYERS];
only the invalid function or declaration and warnings are the problems now.
Reply


Messages In This Thread
Commands not working properly - by JXF - 21.05.2016, 16:33
Re: Commands not working properly - by justjamie - 21.05.2016, 16:36
Re: Commands not working properly - by Stinged - 21.05.2016, 16:37
Re: Commands not working properly - by Konstantinos - 21.05.2016, 16:41
Re: Commands not working properly - by JXF - 21.05.2016, 17:35
Re: Commands not working properly - by Konstantinos - 21.05.2016, 19:55
Re: Commands not working properly - by JXF - 21.05.2016, 20:27
Re: Commands not working properly - by Konstantinos - 21.05.2016, 20:32
Re: Commands not working properly - by JXF - 21.05.2016, 20:48

Forum Jump:


Users browsing this thread: 1 Guest(s)