refill station checkpoints -
MarkoN - 04.07.2012
I made a checkpoint for refilling weapons :
pawn Код:
SetPlayerMapIcon(playerid, 10, 2522.8169,-1679.3861,15.4970, 6, 0, MAPICON_LOCAL_CHECKPOINT);
made a command and , etc.
Now i wanted to make when a player stands in it, it auto shows him the dialog, without typing the command ... I added it to OnPlayerUpdate with if(IsPlayerInRangeOfPoint(playerid, ...... )), but when i close it i opens it again, and again... How can i make it show only once without destroying the checkpoint?
Thanks.
Re: refill station checkpoints -
Roko_foko - 04.07.2012
AddStaticPickup()
OnPlayerPickUpPickup()
i would use these
Re: refill station checkpoints -
Jonny5 - 04.07.2012
well the problem is your still near the point when you close the dialog
there are a few ways to stop this,
move the code out of OnPlayerUpdate and use a timer.
youll need to track the last time they EXIT the dialog,
and if its within X amount of seconds then dont display the dialog.
I would give them 10 seconds of time to get away from the point.
you can use
https://sampwiki.blast.hk/wiki/Tickcount for this.
there are other methods i can think of if you dont like this one.
EDIT:
the method above i think is better than my method!
Re: refill station checkpoints -
MarkoN - 04.07.2012
yeah but, all the pickup designs are confusing ,
http://weedarr.wikidot.com/pickups ...
well nvm ill add a arrow pickup and add a 3dtextlabel , thanks...
EDIT :
Quote:
Originally Posted by Jonny5
well the problem is your still near the point when you close the dialog
there are a few ways to stop this,
move the code out of OnPlayerUpdate and use a timer.
youll need to track the last time they EXIT the dialog,
and if its within X amount of seconds then dont display the dialog.
I would give them 10 seconds of time to get away from the point.
you can use https://sampwiki.blast.hk/wiki/Tickcount for this.
there are other methods i can think of if you dont like this one.
EDIT:
the method above i think is better than my method!
|
Thats great , ill try that , if i dont succeed ill try the other method
Re: refill station checkpoints -
Jonny5 - 04.07.2012
ANY valid object model can be used for pickups.
you are not limited to whats on that page.
also you could use the "sign obj"
and
https://sampwiki.blast.hk/wiki/SetObjectMaterialText
to make a sign into a pickup.
my other idea was to make a small zone for the dialog(s)
but thats a little to complex for this.