[AJUDA] /cadeia
#1

Criei um comando /cadeia [id] [tempo] [motivo], Deu certo o ID e o TEMPO, Mais o MOTIVO Nгo. Eu coloco o motivo ae Nгo aparece, as vezes so a 1° frase ou um . Segue o code do comando abaicho.

Код:
if(strcmp(cmd, "/cadeia",true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	        new tempo[20];
	        new motivo[64];
	        new tempo2;
	        if(PlayerInfo[playerid][pAdmin] < 1338)
	        {
	            SendClientMessage(playerid, COLOR_GREY, "   Vocк nгo esta autorizado para usar este comando!");
	            return 1;
	        }
	        tmp = strtok(cmdtext, idx);
	        tempo = strtok(cmdtext, idx);
	        motivo = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "USE: /cadeia [id] [Tempo] [Motivo] ");
				return 1;
			}
			if(!strlen(tempo))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "USE: /cadeia [id] [Tempo] [Motivo] ");
				return 1;
			}
			if(PlayerInfo[giveplayerid][pAdmin] >= 1342 && PlayerInfo[playerid][pAdmin] < 1340)
			{
				SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo pode dar cadeia para um Admin Dono !");
				return 1;
			}
			if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1342 && PlayerInfo[playerid][pAdmin] != 1341)
			{
				SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/trabalhar)");
				return 1;
			}
			giveplayerid = ReturnUser(tmp);
			tempo2 = strval(tempo);
		    if(IsPlayerConnected(giveplayerid))
		    {
		        if(giveplayerid != INVALID_PLAYER_ID)
		        {
		            GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
					GetPlayerName(playerid, sendername, sizeof(sendername));
					format(string, sizeof(string), "* {696969}%s {FF0000}Colocou {696969}%s {FF0000}Na Cadeia de Admin MOTIVO: {696969}%s.", sendername, giveplayer, motivo);
					SendClientMessageToAll(COLOR_LIGHTRED, string);
					if(admtrampando[playerid] == 1 && admhide[playerid] == 1)
					{
						SendClientMessage(giveplayerid, COLOR_LIGHTRED, "* Vocк foi colocado na Cadeia de Admin pelo admin Forever_Alone.");
					}
					else
					{
						format(string, sizeof(string), "*  Vocк foi colocado na cadeia de admin Pelo Admin %s.", sendername);
						SendClientMessage(giveplayerid, COLOR_LIGHTRED, string);
					}
					GameTextForPlayer(giveplayerid, "~b~Bem Vindo a ~n~~r~Cadeia Admin", 5000, 3);
					ResetPlayerWeaponsEx(giveplayerid);
					WantedPoints[giveplayerid] = 0;
      				SetPlayerWantedLevel(giveplayerid, 0);
					PlayerInfo[giveplayerid][pJailed] = 2;
					PlayerInfo[giveplayerid][pJailTime] = tempo2 * 60;
					SetPlayerInterior(giveplayerid, 6);
		            SetPlayerPos(giveplayerid, 264.3618,77.7751,1001.0391);
		        }
			}
			else
			{
			    SendClientMessage(playerid, COLOR_GREY, "   O jogador estб offline !");
			    return 1;
			}
	    }
	    return 1;
	}
Reply


Messages In This Thread
[AJUDA] /cadeia - by RedBulL_x - 01.10.2011, 15:47
Re : [AJUDA] /cadeia - by [NWD]Jim._.Carrey - 01.10.2011, 15:59
Re: [AJUDA] /cadeia - by Miqueias Barros - 01.10.2011, 16:00
AW: [AJUDA] /cadeia - by RedBulL_x - 02.10.2011, 03:10
Re: [AJUDA] /cadeia - by Miqueias Barros - 02.10.2011, 03:14
AW: [AJUDA] /cadeia - by RedBulL_x - 02.10.2011, 03:26

Forum Jump:


Users browsing this thread: