/aduty Problem
#4

This your code:
Код:
CMD:aduty(playerid, params[])
{
	if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, -1, "You are not a admin to use this command!");
	if(PlayerInfo[playerid][pAdmin] == 2)
	{

	SendClientMessage(playerid, COLOR_GREEN, "You are now on duty admin! Remember to check /reports!");
	PlayerInfo[playerid][pAdmin] = 2;
	SetPlayerHealth(playerid, 100000);
	SetPlayerArmour(playerid, 100000);
	new string[128];
	format(string, sizeof(string), "Administrator %s is now on Admin Duty! (/report for assistance)", GetPlayerNameEx(playerid));
	SendClientMessageToAllEx(COLOR_YELLOW, string);
	}
	else
	{
	SendClientMessage(playerid, COLOR_RED, "You are now off admin duty!");
	new string[128];
	format(string, sizeof(string), "Administrator %s is now off Admin Duty!", GetPlayerNameEx(playerid));
	SendClientMessageToAllEx(COLOR_YELLOW, string);
	SetPlayerHealth(playerid, 100);
	SetPlayerArmour(playerid, 100);
	PlayerInfo[playerid][pAdmin] = 99999;
	}
	return 1;
}
you can try this:
Код:
CMD:aduty(playerid, params[])
{
	if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, -1, "You are not a admin to use this command!");
	{

	SendClientMessage(playerid, COLOR_GREEN, "You are now on duty admin! Remember to check /reports!");
	SetPlayerHealth(playerid, 100000);
	SetPlayerArmour(playerid, 100000);
	new string[128];
	format(string, sizeof(string), "Administrator %s is now on Admin Duty! (/report for assistance)", GetPlayerNameEx(playerid));
	SendClientMessageToAllEx(COLOR_YELLOW, string);
	}
	else
	{
	SendClientMessage(playerid, COLOR_RED, "You are now off admin duty!");
	new string[128];
	format(string, sizeof(string), "Administrator %s is now off Admin Duty!", GetPlayerNameEx(playerid));
	SendClientMessageToAllEx(COLOR_YELLOW, string);
	SetPlayerHealth(playerid, 100);
	SetPlayerArmour(playerid, 100);
	}
	return 1;
}
Reply


Messages In This Thread
/aduty Problem - by sanjil_rijal - 11.04.2012, 11:20
Re: /aduty Problem - by sjvt - 11.04.2012, 12:02
Re : /aduty Problem - by BigBaws - 11.04.2012, 12:08
Re: /aduty Problem - by afa_handler - 11.04.2012, 13:31
Re: /aduty Problem - by sanjil_rijal - 11.04.2012, 13:40

Forum Jump:


Users browsing this thread: 1 Guest(s)