[Ajuda] Skin Carandiru
#1

Estou com o seguinte problema, quando eu coloco um player no carandiru o meu skin muda ao invйs de quem foi preso. Alguem poderia me ajudar?

Код:
		if(strcmp(cmd, "/carandiru",true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	        new tempo[20];
	        new tempo2;
	        if(PlayerInfo[playerid][pAdmin] < 2)
	        {
	            SendClientMessage(playerid, COLOR_GREY, "   Vocк nгo esta autorizado para usar este comando!");
	            return true;
	        }
	        tmp = strtok(cmdtext, idx);
	        tempo = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "USE: /carandiru [id] [Tempo] [Motivo]");
				return true;
			}
			if(!strlen(tempo))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "USE: /carandiru [id] [Tempo] [Motivo]");
				return true;
			}
			if(PlayerInfo[giveplayerid][pAdmin] >= 1339 && PlayerInfo[playerid][pAdmin] < GERENTE)
			{
				SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo pode prender um Admin Dono !");
				return true;
			}
            if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != DONO)
			{
				SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/trabalhar)");
				return true;
			}
			giveplayerid = ReturnUser(tmp);
			tempo2 = strval(tempo);
			new length = strlen(cmdtext);
			while ((idx < length) && (cmdtext[idx] <= ' '))
			{
			idx++;
			}
			new offset = idx;
			new result[64];
			while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
			{
			result[idx - offset] = cmdtext[idx];
			idx++;
			}
			result[idx - offset] = EOS;
		    if(IsPlayerConnected(giveplayerid))
		    {
		        if(giveplayerid != INVALID_PLAYER_ID)
		        {
		            GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
					GetPlayerName(playerid, sendername, sizeof(sendername));
					//PlayerInfo[giveplayerid][pJailTime] = time * 60;
					//format(string, sizeof(string), "* Vocк Colocou o(a) %s No Carandiru", giveplayer);
					format(string, sizeof(string), "Admin %s colocou %s no Carandiru, por %s minutos, Motivo: %s",PlayerName(playerid), giveplayer, tempo, (result));
					SendClientMessageToAll(0xF83100AA, string);
					if(admtrampando[playerid] == 1 && admhide[playerid] == 1)
					{
						SendClientMessage(giveplayerid, COLOR_LIGHTRED, "* Vocк foi colocado no Carandiru.");
					}
					else
					{
						format(string, sizeof(string), "* Vocк foi colocado na Carandiru, Pelo Admin %s.", PlayerName(playerid));
						SendClientMessage(giveplayerid, COLOR_LIGHTRED, string);
					}
                    GameTextForPlayer(giveplayerid, "~b~Bem Vindo ao ~n~~r~Carandiru", 5000, 3);
                    ResetPlayerWeaponsEx(giveplayerid);
                    WantedPoints[giveplayerid] = 0;
                    SetPlayerWantedLevel(giveplayerid, 0);
                    PlayerInfo[giveplayerid][pJailed] = 2;
                    PlayerInfo[giveplayerid][pJailTime] = tempo2 * 60;
                    SetPlayerSkin(playerid, 268);
					SetPlayerPos(giveplayerid, 268.5777,1857.9351,9.8133);
                    SetPlayerWorldBounds(giveplayerid, 337.5694,101.5826,1940.9759,1798.7453); //285.3481,96.9720,1940.9755,1799.0811
		        }
			}
			else
			{
			    SendClientMessage(playerid, COLOR_GREY, "   O jogador estб offline !");
			    return true;
			}
	    }
	    return true;
	}
Reply
#2

pawn Код:
//troque
SetPlayerSkin(playerid, 268);
//por
SetPlayerSkin(giveplayerid, 268);
Reply
#3

Quote:
Originally Posted by Programador_Macabro
Посмотреть сообщение
pawn Код:
//troque
SetPlayerSkin(playerid, 268);
//por
SetPlayerSkin(giveplayerid, 268);
Deu certo, porem se o player que estб preso morrer ele volta com a skin normal dele e nгo com a skin de preso. Poderia me ajudar com isso?
Reply
#4

Procura por algo em OnPlayerDeath :
pawn Код:
if(PlayerInfo[playerid][pJailed] >= 2)
{
e dentro adicione "SetPlayerSkin(playerid,26;"
Reply
#5

Vlw deu certo
Reply
#6

Quote:
Originally Posted by darkxdll
Посмотреть сообщение
Procura por algo em OnPlayerDeath :
pawn Код:
if(PlayerInfo[playerid][pJailed] >= 2)
{
e dentro adicione "SetPlayerSkin(playerid,26;"
Nгo deu certo aqui, poderia explicar melhor cara?
Reply
#7

Quote:
Originally Posted by DR_X
Посмотреть сообщение
Nгo deu certo aqui, poderia explicar melhor cara?
Se nгo deu certo ai faz o seguinte:
Procura a linha:
//SetPlayerWorldBounds(giveplayerid, 337.5694,101.5826,1940.9759,1798.7453); //285.3481,96.9720,1940.9755,1799.0811

e coloca
if(PlayerInfo[playerid][pJailed] >= 2)
SetPlayerSkin(playerid, 26;

em cima ^^
Reply
#8

Quote:
Originally Posted by Amt.
Посмотреть сообщение
Se nгo deu certo ai faz o seguinte:
Procura a linha:
//SetPlayerWorldBounds(giveplayerid, 337.5694,101.5826,1940.9759,1798.7453); //285.3481,96.9720,1940.9755,1799.0811

e coloca
if(PlayerInfo[playerid][pJailed] >= 2)
SetPlayerSkin(playerid, 26;

em cima ^^
Valeu, deu certo agora.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)