hi help pickup
#1

hi help
how to save pickup i off or on server no disapear?
Reply
#2

Load your pickups in by using an iteration, example for loop, on OnGameModeInit. Then "kill/destroy" them on OnGameModeExit by either using an already built in function or with an iteration loop again (if you're using streamer plugin for instance).

Make sure you "name" your pickups, meaning you give them "rare" IDs, for as in not giving two the same. Make this with an array, declare it above in the script, e.g. myPickups[maxPickups]; and above that set so that when you type maxPickups it means "(100)" whatever you'd like it to have.

To assign a pickup icon an id, simple do check first if the ID is already being used, like saving the icon to an ini file for instance or any other way you have pleasure for. Then add it something like this:
myPickups[aNumberHereOrVariableKeepingTrackOfThePickup] = CreatePickup.../CreateDynamicPickup...



Now based on your English I did not understand what you actually meant. Reading your comment again I'm starting to feel that you wanted the pickups to not disappear when someone entered them. Change the type parameter in any sort of CreatePickup. https://sampwiki.blast.hk/wiki/PickupTypes

Additional links:
https://sampwiki.blast.hk/wiki/CreatePickup
https://sampforum.blast.hk/showthread.php?tid=102865
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)