[Ajuda] Conflitos com 'newkeys' - 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] Conflitos com 'newkeys' (
/showthread.php?tid=676723)
Conflitos com 'newkeys' -
Aguiar - 17.06.2020
Bom dia estou a ter problemas com a KEY_YES, nгo estб funcionando eu jб tirei a verificaзгo se estб no local e nгo vai
a baixo se segue o cуdigo
PHP Code:
if((oldkeys & KEY_YES) && !(newkeys & KEY_YES))
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, 1363.65234, -1749.96948, 13.05720))
{
if(!IsPlayerInAnyVehicle(playerid))
{
ShowPlayerDialog(playerid, DIALOG_ATM, DIALOG_STYLE_LIST, "{FFFFFF}ATM", "Saldo bancбrio \nDepositar dinheiro\nSacar dinheiro\nTransferencia bancбria", "Selecionar", "Cancelar");
}
}
return 1;
}
Re: Conflitos com 'newkeys' -
darkxdll - 17.06.2020
PHP Code:
if((oldkeys & KEY_YES) && !(newkeys & KEY_YES))
Ta ao contrбrio isso aн, nгo esta?
Correto:
PHP Code:
if((newkeys & KEY_YES) && !(oldkeys & KEY_YES))
Re: Conflitos com 'newkeys' -
MateGPlay - 17.06.2020
Tenta assim:
PHP Code:
#define PRESSED(%0) \
(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0))) //topo da gm
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(PRESSED(KEY_YES))
if(IsPlayerInRangeOfPoint(playerid, 3.0, 1363.65234, -1749.96948, 13.05720) && !IsPlayerInAnyVehicle(playerid))
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "{FFFFFF}ATM", "Saldo bancбrio \nDepositar dinheiro\nSacar dinheiro\nTransferencia bancбria", "Selecionar", "Cancelar");
return 1;
}