[Pedido] Info
#5

Код:
	if(strcmp(cmd, "/mudarinfo", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD1, "USO: /setstat [playerid/Parte-do-Nick] [statcode] [amount]");
				SendClientMessage(playerid, COLOR_GRAD4, "|1 Kills |2 Mortes");
				return 1;
			}
			giveplayerid = ReturnUser(tmp);
            if(IsPlayerConnected(giveplayerid))
	    	{
	    	    if(giveplayerid != INVALID_PLAYER_ID)
	    	    {
					tmp = strtok(cmdtext, idx);
					if(!strlen(tmp))
					{
						SendClientMessage(playerid, COLOR_GRAD1, "USO: /mudarinfo [playerid/Parte-do-Nick] [statcode] [amount]");
						SendClientMessage(playerid, COLOR_GRAD4, "|1 Kills |2 Mortes");
						return 1;
					}
					new stat;
					stat = strval(tmp);
					tmp = strtok(cmdtext, idx);
					if(!strlen(tmp))
					{
						SendClientMessage(playerid, COLOR_GRAD1, "USO: /setstat [playerid/Parte-do-Nick] [statcode] [amount]");
						SendClientMessage(playerid, COLOR_GRAD4, "|1 Kills |2 Mortes")");
						return 1;
					}
					new amount;
					amount = strval(tmp);
					new nome[24];
                    GetPlayerName(playerid, nome, sizeof nome);
					if (PlayerInfo[playerid][pAdmin] >= 4000 || strfind(nome, ADMPLAYER, true) == 0 || strfind(nome, ADMPLAYER2, true) == 0)
					{
						switch (stat)
						{
							case 1:
							{
								PlayerInfo[giveplayerid][pMortes] = amount;
								format(string, sizeof(string), "   O jogador foi setado para Mortes %d", amount);
							}
							case 2:
							{
								PlayerInfo[giveplayerid][pKills] = amount;
								format(string, sizeof(string), "   O Jogador foi setado para Kills %d  ", amount);
							}

					}
					else
					{
						SendClientMessage(playerid, COLOR_GRAD1, "   Vocк nгo pode usar esse comando!");
					}
				}//not valid id
			}//not connected
		}
		return 1;
	}//PremmyExpire
TENTA AEW
Reply


Messages In This Thread
Info - by denis15711 - 02.07.2012, 19:11
Re: Info - by leonardo1434 - 02.07.2012, 19:17
Re: Info - by paulor - 02.07.2012, 20:12
AW: Info - by denis15711 - 02.07.2012, 20:52
Re: Info - by victor304 - 02.07.2012, 22:47
AW: Info - by denis15711 - 03.07.2012, 12:13
AW: Info - by denis15711 - 03.07.2012, 12:33

Forum Jump:


Users browsing this thread: 1 Guest(s)