04.08.2017, 15:20
(
Last edited by PedroH; 04/08/2017 at 04:18 PM.
)
Ola, tou tentando fazer com que quando o player chegue perto de uma caixa e ele apertar a tecla aparecera um dialog para ele, so que quando o player aperta a tecla nao acontece nada!
ai vai:
OnPlayerKeyStateChange:
OBS: Eu coloquei por comando e deu certo, mas com a tecla nao vai! alguem ajuda?
@Edit Bem, eu descobri que o erro esta aqui:
pois quando eu tiro isso pega normal, entгo onde eu devo colocar isso? eu quero que o pegue 2 items no maximo! eu acho que e pq isso ta no lugar errado mas nao sei onde colocar, alguem ajuda?
ai vai:
OnPlayerKeyStateChange:
PHP Code:
if(PRESSED(KEY_NO))
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, -319.5000000,1049.1000000,19.3000000))
if(IsPlayerInRangeOfPoint(playerid, 2.0, -334.3999900,1050.2000000,18.7000000))
{
if(Player[playerid][pegounacaixa] >= 2)
{
SendClientMessage(playerid, 0xDE6847FF, Translate(Player[playerid][pIdioma], "[INFO]: Vocй jб pegou o maximo de items, espere o proximo respawn!!." ,"[INFO]: You've already got the maximum items, wait for the next respawn."));
}
else
ShowPlayerDialog(playerid, DIALOG_HOSPITAL, DIALOG_STYLE_LIST,"Hospital","Bandage\nPainkiller\nBlood Bag\nMed Kit\nMorphine","Take","Close");
}
}
@Edit Bem, eu descobri que o erro esta aqui:
PHP Code:
if(Player[playerid][pegounacaixa] >= 2)
{
SendClientMessage(playerid, 0xDE6847FF, Translate(Player[playerid][pIdioma], "[INFO]: Vocй jб pegou o maximo de items, espere o proximo respawn!!." ,"[INFO]: You've already got the maximum items, wait for the next respawn."));
}