Player stats not saved +REP
#2

Use this :
Code:
CMD:makeadmin(playerid,params[])
{
	if(!IsPlayerAdmin(playerid))return SendClientMessage(playerid,0xFF0000FF,"<!>You are not authorized to use this command!");
 	new pID,rank,string1[128],string2[128],string3[128];
 	if(sscanf(params,"ui",pID,rank))return SendClientMessage(playerid,COL_GREEN,"/makeadmin [id] [level]");
 	if(rank<0||rank>8)return SendClientMessage(playerid,COL_GREEN,"Please write an acceptable level.");
 	PlayerInfo[pID][pAdmin] = rank;
 	format(string1,sizeof(string1),"You promoted %s to level %i",PlayerName(pID),rank);
 	format(string2,sizeof(string2),"* You are promoted to level %i. Try /admincommands [%i] to see the commands you can use now.",rank,rank);
 	for(new i=0;i<GetMaxPlayers();i++)
	{
	if(IsPlayerConnected(i))
	{
	if(IsPlayerAnAdmin(i,1))
	{
    format(string3,sizeof(string3),"A: %s [LEVEL: %i] used the MAKEADMIN command.",PlayerName(playerid),GetPVarInt(playerid,"Admin"));
	SendClientMessage(i,COLOR_ORANGE,string3);
	}
	}
	}
	SendClientMessage(playerid,COLOR_LIGHTBLUE,string1);
 	SendClientMessage(pID,COLOR_ORANGE,string2);
   	return 1;
}
Reply


Messages In This Thread
Player stats not saved +REP - by YoussefHammad - 19.08.2015, 06:55
Re: Player stats not saved +REP - by X337 - 19.08.2015, 07:26
Re: Player stats not saved +REP - by YoussefHammad - 19.08.2015, 07:31

Forum Jump:


Users browsing this thread: 1 Guest(s)