SA-MP Forums Archive
weapon shop and antenna system - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: weapon shop and antenna system (/showthread.php?tid=608119)



weapon shop and antenna system - 1fret - 27.05.2016

Ok what function should i use to make this :


EXPLANATION: Where the briefcase spins(i dont think its a pickup) and in order to open the weapon shop system you got to press the letter "H" and it opens up the weapon menu.

Also i want an antenna system (Im not requesting any script ) where team 1 destroys team 2 antenna system and ones team 2 antenna is destroyed they cant use radio or something. Could someone leave a link to a tutorial or something

Hope you understand if not i will explain more if you want


Re: weapon shop and antenna system - 1fret - 28.05.2016

Bump


Re: weapon shop and antenna system - Dayrion - 29.05.2016

Heey.
It's a pickup (ID : 1210) with is 3D label (Check this). The key is KEY_CTRL_BACK (value : 262144) used in OnPlayerKeyStateChange(...).
So where do you need help?


Re: weapon shop and antenna system - 1fret - 29.05.2016

Notice I have mention two thingsthe briefcase as I have said I think the briefcase is an pickup but I don't know how to code it so that when a player presses the "h" key it doesnts despawn it only stay there and spin.


And about the antenna I want an example of what to do to code an antenna system where the antenna is destroyable and will reset it health after a few mins or so


Re: weapon shop and antenna system - TrueThing - 29.05.2016

Quote:
Originally Posted by 1fret
Посмотреть сообщение
Notice I have mention two thingsthe briefcase as I have said I think the briefcase is an pickup but I don't know how to code it so that when a player presses the "h" key it doesnts despawn it only stay there and spin.
Yes create the pickup and the label then in OnPlayerKeyStateChange check if "H" pressed if yes then check if IsPlayerInRangeOfPoint pickup x y z.


about antenna system check this tutorial https://sampforum.blast.hk/showthread.php?tid=488317 now when you created your object and set the health you need to create a timer so when the object destroys it will recreate it again when the timer finishes