[AJUDA] Apertar F ao entrar - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [AJUDA] Apertar F ao entrar (
/showthread.php?tid=308371)
[AJUDA] Apertar F ao entrar -
GuikBretas - 03.01.2012
Pessoal eu to com um problema no meu sistema de Apertar F para Equipar/Entrar, as vezes quando eu aperto enter em um carro, aparece que pegou o Crachб e o Uniforme no armбrio, como eu resolvo?
Sistema Inteiro:
pawn Код:
//Forward para verificar F
forward VerificarF(playerid);
public VerificarF(playerid)
{
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1) //F de Policiais
{
if(PlayerToPoint(3, playerid,255.3,77.4,1003.6) || PlayerToPoint(3,playerid,-1616.1294,681.1594,7.1875) || PlayerInfo[playerid][pLocal] != 255)
{
OnPlayerCommandText(playerid, "/batercartao");
//Create3DTextLabel("Aperte 'F' para Bater Cartгo", COLOR_LIGHTBLUE, 254.5738,77.0317,1003.6406, 10, 0, 0);
}
else { return 1; }
}
if(PlayerToPoint(1.0, playerid, 361.9731,172.3335,1008.3828)) //Prefeitura
{
OnPlayerCommandText(playerid, "/menuempregos");
}
if(PlayerToPoint(1.0, playerid, 361.7670,174.3943,1008.3893))
{
OnPlayerCommandText(playerid, "/adqlicencas");
}
if(EstanoATM(playerid)) //ATM
{
ShowPlayerDialog(playerid, DIALOG_ATM, DIALOG_STYLE_LIST, "Caixa Eletrфnico / 24/7", "Depositar\nSacar\nVerificar Saldo\nTransferir\nRoubar", "OK", "Sair");
}
return 1;
}
//OnPlayerKeyStateChange
if(newkeys == 16 && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) //Enter/F
{
OnPlayerCommandText(playerid, "/entrar");
OnPlayerCommandText(playerid, "/sair");
CheckForWalkingTeleport(playerid);
VerificarF(playerid);
}
Re: [AJUDA] Apertar F ao entrar -
WeenSoares_ - 03.01.2012
Remova
pawn Код:
PlayerInfo[playerid][pLocal] != 255
e tente !
Re: [AJUDA] Apertar F ao entrar -
Escallus - 03.01.2012
pawn Код:
if(PlayerToPoint(1.0, playerid, 361.7670,174.3943,1008.3893))
{
IsPlayerInRangeOfPoint(playerid, COORDENADAS DO LOCAL DAS LICENCAS);
OnPlayerCommandText(playerid, "/adqlicencas");
}
Se colocar IsPlayerInRangeOfPoint serб que nгo dб certo?Ah, sei lб, se nгo der,nгo sei o que pode ser.