SA-MP Forums Archive
Simple question i guess - 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: Simple question i guess (/showthread.php?tid=339252)



Simple question i guess - codebreaker23 - 02.05.2012

ok so i got this gtaiv ammunation shop fs for a friend
but my question is out can i remove the ammo boxes for the weapons to go like in the video
[ame]http://www.youtube.com/watch?v=jUCD0tibvu8[/ame]
the id for the object is 18105 according to mta map editor
but DestroyObject(18105); doesnt remove it..
and the guns spawn in the boxes..
help would be nice.. thanks


Respuesta: Simple question i guess - admantis - 02.05.2012

These boxes are part of the object interior (1 object for the whole interior!), so not even RemoveBuildingForPlayer would work. You can't do anything but map a completely new ammunation or change the object position.

Also, DestroyObject wouldn't work in this case, because it will remove an object ID by the server. For example if you add 5 objects, and use DestroyObject(3); it will destroy the third object (overall).


Re: Simple question i guess - codebreaker23 - 02.05.2012

alright thats sucks i was hoping i could remove it cause the ammo boxes that are sititng there are a seperate object from the int building itself


Re: Simple question i guess - codebreaker23 - 02.05.2012

Solution found and problem fixed Used

RemoveBuilding
Global "RemoveBuildingForPlayer"

https://sampforum.blast.hk/showthread.php?pid=1551937#pid1551937

RemoveSpecificBuilding(18105);

should have looked more before posting :\ but thanks anyways repped for sparking the search with removebuildingforplayer