[Pedido]Comando /daradmin Bugado
#3

Код:
if(strcmp(cmd, "/daradmin", true) == 0)
	{
		if(IsPlayerConnected(playerid))
		{
			if(PlayerInfo[playerid][pAdmin] < 1341)
			{
				SendClientMessage(playerid, COLOR_LIGHTGREEN, "[SERVER]: Voce nгo esta autorizado a usar este comando!");
				return 1;
			}
			AdmsVaga();
			if(VagaSobrando == 0)
			{
				SendClientMessage(playerid, COLOR_GRAD2, "Nгo hб mais vagas na lista use /limparadm [ Vaga ].");
				return 1;
			}
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "USE: /daradmin [ id ] [Level 0 б 1341]");
				return 1;
			}
			new para1;
			new level;
			para1 = ReturnUser(tmp);
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "USE: /daradmin [ id ] [Level 0 б 1341]");
				return 1;
			}
			level = strval(tmp);
			if(level == 0)
			{
				SendClientMessage(playerid, COLOR_GRAD2, "USE: /limparadm [ Vaga ]");
				return 1;
			}
			GetPlayerName(para1, giveplayer, sizeof(giveplayer));
			GetPlayerName(playerid, sendername, sizeof(sendername));
			if(IsPlayerConnected(para1))
			{
				if(para1 != INVALID_PLAYER_ID)
				{
					if(PlayerInfo[para1][pAdmin] >= 1341)
					{
						SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo pode promover um Admin Dono!");
						format(string, sizeof(string), "O admin %s tentou te promover a nivel %d",sendername ,level);
						SendClientMessage(para1, COLOR_AZULBB, string);
						return 1;
					}
					format(string, sizeof(string), "   Vocк foi promovido para level  %d de Admin - Por %s", level, sendername);
					SendClientMessage(para1, COLOR_LIGHTBLUE, string);
					format(string, sizeof(string), "   Vocк promoveu o(a) %s Para o level %d de Admin.", 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);
					PAdminsLog(string);
					for(new i = 0; i < sizeof(AdmInfo); i++)
					{
						if(PlayerInfo[para1][pAdmin] > 0)
						{
							PlayerInfo[para1][pAdmin] = level;
							break;
						}
						else if(AdmInfo[i][AdminVaga] == 0)
						{
							PlayerInfo[para1][pAdmin] = level;
							AdmInfo[i][gMembro] = giveplayer;
							AdmInfo[i][AdminVaga] = 1;
							SaveAdm();
							break;
						}
					}
				}
			}
		}
		return 1;
	}
Reply


Messages In This Thread
[Pedido]Comando /daradmin Bugado - by Shakal_XD - 16.06.2012, 01:33
Re: [Pedido]Comando /daradmin Bugado - by ViictorDaay- - 16.06.2012, 02:04
Re: [Pedido]Comando /daradmin Bugado - by Bruno Gabriel - 27.11.2012, 16:01

Forum Jump:


Users browsing this thread: 3 Guest(s)