08.01.2014, 17:24
(
Последний раз редактировалось CutX; 08.01.2014 в 19:43.
)
Quote:
I solved thic topic https://sampforum.blast.hk/showthread.php?tid=486392 and when I stay on pickup he shows me again and again and I can't move how he shows me.How I made little bit slower shows me when I stay on pickup.It is an dialog.Thanks!
|
You go to the pickup, a dialog opens, you close the dialog and it opens again
cuz youre still standing in that pickup right?
this should fix it:
pawn Код:
//global var
new P_buffer[MAX_PLAYERS];
//right under OnPlayerPickuppickup
if(P_buffer[playerid]) if(gettime() - P_buffer[playerid] <= 5) return 1;//is checking if your last pickuppickup was 5 seconds ago.
P_buffer[playerid] = gettime();
P_buffer[playerid] = gettime();
from onplayerpickuppickup to a dialog in OnDialogResponse.
So that it will get the time when you close a dialog.
Cuz if you stand in that pickup for a while and have that dialog opened for more than 5 seconds and close it, it will appear again. you'd have to get away from the pickup within 5 seconds at pickup