ID 0 Bugged?
#7

Код:
CMD:makeadmin(playerid, params[])  {
	if(PlayerInfo[playerid][pAdmin] >= 99998) {

		new
		iAdminValue,
		iTargetID;

		if(sscanf(params, "ui", iTargetID, iAdminValue)) {
			SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /makeadmin [playerid] [level]");
		}
		else if(IsPlayerConnected(iTargetID)) {
			if(PlayerInfo[iTargetID][pHelper] >= 1) {
				SendClientMessageEx(playerid, COLOR_GRAD1, "You cannot make Community Helpers admins!");
			}
			else {

				new
				szMessage[47 + (MAX_PLAYER_NAME * 2)];

				PlayerInfo[iTargetID][pAdmin] = iAdminValue;
				format(szMessage, sizeof(szMessage), "AdmCmd: %s has promoted %s to a level %d admin.", GetPlayerNameEx(playerid), GetPlayerNameEx(iTargetID), iAdminValue);
				ABroadCast(COLOR_LIGHTRED,szMessage, 2);
				format(szMessage, sizeof(szMessage), "You have been promoted to a level %d admin by %s.", iAdminValue, GetPlayerNameEx(playerid));
				SendClientMessageEx(iTargetID, COLOR_LIGHTBLUE, szMessage);
				format(szMessage, sizeof(szMessage), "You have promoted %s to a level %d admin.", GetPlayerNameEx(iTargetID),iAdminValue);
				SendClientMessageEx(playerid, COLOR_LIGHTBLUE, szMessage);
			}
		}
		else SendClientMessageEx(playerid, COLOR_GRAD2, "Invalid player specified.");
	}
	else SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command!");
	return 1;
}
Reply


Messages In This Thread
ID 0 Bugged? - by CountryTrooper441 - 15.08.2013, 01:51
Re: ID 0 Bugged? - by Naruto_Emilio - 15.08.2013, 02:37
Re: ID 0 Bugged? - by CountryTrooper441 - 15.08.2013, 18:15
Re: ID 0 Bugged? - by Pawnie - 15.08.2013, 18:17
Re: ID 0 Bugged? - by CountryTrooper441 - 15.08.2013, 18:29
Re: ID 0 Bugged? - by HyperZ - 15.08.2013, 18:32
Re: ID 0 Bugged? - by CountryTrooper441 - 15.08.2013, 18:37
Re: ID 0 Bugged? - by HyperZ - 15.08.2013, 18:42
Re: ID 0 Bugged? - by CountryTrooper441 - 16.08.2013, 02:41
Re: ID 0 Bugged? - by cray1100 - 16.08.2013, 04:18

Forum Jump:


Users browsing this thread: 2 Guest(s)