Need help with this code..
#1

Код:
CMD:aduty(playerid, params[]) {
	new string[128];
    if((PlayerInfo[playerid][pAdmin] >= 2) && GetPVarInt(playerid, "IsInArena") < 0 && !GetPVarInt(playerid, "EventToken")) {
		if(PlayerInfo[playerid][pAdminDuty]) {
			PlayerInfo[playerid][pAdminDuty] = 0;
			PlayerInfo[playerid][pTogReports] = 1;
			//SetPlayerToTeamColor(playerid);
			SendClientMessageEx(playerid, COLOR_WHITE, "You have clocked out from Admin Duty, you are now in Role Play Mode.");
			format(string, sizeof(string), "{AA3333}Admin Duty{FFFF00}: %s has clocked off and is now off duty.", GetPlayerNameEx(playerid));
			ABroadCast(COLOR_YELLOW,string, 2);
		}
		else {
			PlayerInfo[playerid][pAdminDuty] = 1;
			PlayerInfo[playerid][pTogReports] = 0;
			//SetPlayerToTeamColor(playerid);
			SendClientMessageEx(playerid, COLOR_WHITE, "You have clocked in to Admin Duty, you are no longer in Role play Mode.");
			format(string, sizeof(string), "{AA3333}Admin Duty{FFFF00}: %s has clocked in and is now on duty.", GetPlayerNameEx(playerid));
			ABroadCast(COLOR_YELLOW,string, 2);
		}
	}
	return 1;
}

CMD:eaduty(playerid, params[])
{
	if(PlayerInfo[playerid][pAdmin] != 99999) return 1;
	if(PlayerInfo[playerid][pAdminDuty] != 2) {
	    SendClientMessageEx(playerid, -1, "You are now on EAdmin Duty.");
	    PlayerInfo[playerid][pAdminDuty] = 2;
	}
	else {
	    SendClientMessageEx(playerid, -1, "You are no longer on EAdmin Duty.");
	    PlayerInfo[playerid][pAdminDuty] = 1;
	}
	return 1;
}
Guys i've made this code and added to my gamemode, but after compiling it i get this error. Can someone help me to resolve it?

Error:
Код:
DGRP.pwn(55572) : error 017: undefined symbol "pAdminDuty"
DGRP.pwn(55572) : error 017: undefined symbol "pAdminDuty"
DGRP.pwn(55572) : error 017: undefined symbol "pAdminDuty"
DGRP.pwn(55572) : error 017: undefined symbol "pAdminDuty"
DGRP.pwn(55572) : error 017: undefined symbol "pAdminDuty"
DGRP.pwn(55572) : error 017: undefined symbol "pAdminDuty"
Reply


Messages In This Thread
Need help with this code.. - by muzammilfreeman - 21.06.2015, 12:04
Re: Need help with this code.. - by Dusan01 - 21.06.2015, 12:05
Re: Need help with this code.. - by UltraScripter - 21.06.2015, 12:07
Re: Need help with this code.. - by Ritzy2K - 21.06.2015, 12:07
Re: Need help with this code.. - by muzammilfreeman - 21.06.2015, 12:12
Re: Need help with this code.. - by UltraScripter - 21.06.2015, 12:13
Re: Need help with this code.. - by kyriakos587 - 21.06.2015, 12:13
Re: Need help with this code.. - by Dusan01 - 21.06.2015, 12:14
Re: Need help with this code.. - by Ritzy2K - 21.06.2015, 12:14
Re: Need help with this code.. - by UltraScripter - 21.06.2015, 12:15

Forum Jump:


Users browsing this thread: 3 Guest(s)