SA-MP Forums Archive
Object Problem - 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: Object Problem (/showthread.php?tid=663598)



Object Problem - PoniStar - 06.02.2019

hi guys so i have this special object:
Код:
PlayerExp[playerid] = CreateObject(1252, GetPVarFloat(playerid,"BXPos")+1, GetPVarFloat(playerid,"BYPos")+1, GetPVarFloat(playerid,"BZPos")-0.8942,   90.000, 0.0000, 0.0000);
it will destroy [explode] after i shoot it , but after a little time it will auto re-create! i want to its not create again what should i do?


Re: Object Problem - MEGADETHS - 06.02.2019

Just delete the object when you shot it.

https://sampwiki.blast.hk/wiki/DestroyObject


Re: Object Problem - PoniStar - 06.02.2019

yeah , but how should i detect that the object was explode once!!?


Re: Object Problem - Lunoxx - 06.02.2019

Show your code please, show how you destroy this object.


Re: Object Problem - Dayrion - 06.02.2019

Read the message below.


Re: Object Problem - Beckett - 06.02.2019

Quote:
Originally Posted by Dayrion
Посмотреть сообщение
You must use a dynamic object (using STREAMER plugin) then you will be able to use: `OnPlayerShootDynamicObject(playerid, weaponid, objectid, Float, Float:y, Float:z)` callback.
You can detect it with OnPlayerWeaponShot (BULLET_HIT_TYPE_OBJECT), without having to use any external plugin.


Re: Object Problem - Dayrion - 06.02.2019

Quote:
Originally Posted by DaniceMcHarley
Посмотреть сообщение
You can detect it with OnPlayerWeaponShot (BULLET_HIT_TYPE_OBJECT), without having to use any external plugin.
My bad, I removed my message.
I knew there was a callback called like that without using the streamer plugin but I didn't found it. :c