[Ajuda] /criaradmin
#4

Olб JowSmith!

Tente:
Код:
	if(strcmp(cmd, "/criaradmin", true) == 0)
{
	if(IsPlayerConnected(playerid))
	{
		if(PlayerInfo[playerid][pAdmin] < 3001)
		{
			SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo pode usar este comando!");
			return 1;
		}
		if(!strcmp(playername, "MatuH_GoodH", true))
		{
			SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo pode usar este comando!");
			return 1;
		}
		tmp = strtok(cmdtext, idx);
		if(!strlen(tmp))
		{
			SendClientMessage(playerid, COLOR_GRAD2, "USE: /criaradmin [id] [Nivel(de 1 a 3)]");
			return 1;
		}
		new para1;
		new level;
		para1 = ReturnUser(tmp);
		tmp = strtok(cmdtext, idx);
		if(!strlen(tmp))
		{
			SendClientMessage(playerid, COLOR_GRAD2, "USE: /criaradmin [id] [Nivel(de 1 a 3)]");
			return 1;
		}
		level = strval(tmp);
		if(level > 3001)
		{
			SendClientMessage(playerid, COLOR_GRAD1, "	Nгo se pode criar um admin com nivel maior que 3001");
			return true;
		}
		GetPlayerName(para1, giveplayer, sizeof(giveplayer));
		GetPlayerName(playerid, sendername, sizeof(sendername));
		if(IsPlayerConnected(para1))
		{
			if(para1 != INVALID_PLAYER_ID)
			{
     			        if(level == 0)
				{
					format(string, sizeof(string), "  Vocк retirou o admin de %s.", giveplayer);
					SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
					format(string, sizeof(string), "  O Admin %s retirou seu admin!", sendername);
					SendClientMessage(para1, COLOR_LIGHTBLUE, string);
					PlayerInfo[para1][pAdmin] = 0;
					getdate(year, month, day);
					gettime(hour,minute,second);
					format(string, sizeof(string), "%s retirou o admin de %s [%d/%d/%d] бs [%d:%d:%d].", sendername, giveplayer, day,
					month, year, hour, minute, second);
					PAdminsLog(string);
					return true;
				}
				if(level > 1337)
				{
					if(strcmp(sendername,"MatuH_GoodH",true)==0 || strcmp(sendername,NOME1,true)==0|| strcmp(sendername,NOME2,true)==0 || strcmp(sendername,NOME3,true)==0 ||
					strcmp(sendername,NOME4,true)==0)
					{
                     			}
					else
					{
						PodeNaoMulek;
						return true;
					}
				}
				format(string, sizeof(string), "   Vocк foi promovido a nivel %d de admin, pelo admin %s", level, sendername);
				SendClientMessage(para1, COLOR_LIGHTBLUE, string);
				format(string, sizeof(string), "   Vocк promoveu %s Para admin Nivel %d", giveplayer,level);
				SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
				getdate(year, month, day);
				gettime(hour,minute,second);
				format(string, sizeof(string), "%s deu admin nivel %d para %s [%d/%d/%d] бs [%d:%d:%d].", sendername, level, giveplayer, day,
				month, year, hour, minute, second);
				PlayerInfo[para1][pAdmin] = level;
				PAdminsLog(string);
			}
		}
	}
	return 1;
}
Vlw!
Reply


Messages In This Thread
/criaradmin - by JowSmith - 08.03.2013, 19:30
Re: /criaradmin - by Mateus_. - 09.03.2013, 01:04
Re: /criaradmin - by JowSmith - 09.03.2013, 10:35
Re: /criaradmin - by NuTShoT - 09.03.2013, 10:47
Re: /criaradmin - by JowSmith - 09.03.2013, 15:34

Forum Jump:


Users browsing this thread: 1 Guest(s)