DestroyObject doesn't work - 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: DestroyObject doesn't work (
/showthread.php?tid=582024)
DestroyObject doesn't work -
meocahat - 17.07.2015
I have added the maps to the FS:
Код:
#include <a_samp>
#define FILTERSCRIPT
new tmpobjid;
public OnFilterScriptInit()
{
print("////////////////////////////////////////////");
print("Red County Roleplay Map by Intagaming loaded");
print("////////////////////////////////////////////");
tmpobjid = CreateObject(19379,498.914,500.245,1879.925,0.000,90.000,0.000,300.000);
SetObjectMaterial(tmpobjid, 0, 14832, "lee_stripclub", "Strip_wood_floor", 0);
tmpobjid = CreateObject(19379,498.909,509.861,1879.925,0.000,90.000,0.000,300.000);
SetObjectMaterial(tmpobjid, 0, 14832, "lee_stripclub", "Strip_wood_floor", 0);
tmpobjid = CreateObject(19451,504.223,509.883,1881.759,0.000,0.000,0.000,300.000);
SetObjectMaterial(tmpobjid, 0, 8130, "vgsschurch", "vgschapelwall01_64", 0);
return 1;
}
public OnFilterScriptExit()
{
DestroyObject(tmpobjid);
print("All maps has been deleted.");
return 1;
}
But when i unload the FS, the objects doesn't disappear. How to fix this ?
Re: DestroyObject doesn't work -
SoFahim - 17.07.2015
Make it like
PHP код:
new tmpobjid[***];
and replace the CreateObject with CreateDynamicObject
After it
PHP код:
DestroyDynamicObject(tmpobjid[i]);
. I think it good them the createobject
AW: DestroyObject doesn't work -
Kaliber - 17.07.2015
Код:
#define FILTERSCRIPT
Remove this shit
Re: AW: DestroyObject doesn't work -
SoFahim - 17.07.2015
Quote:
Originally Posted by Kaliber
Код:
#define FILTERSCRIPT
Remove this shit 
|
I don't think, it really need to delete
Re: DestroyObject doesn't work -
PrinceKumar - 17.07.2015
Just create an array because you are trying to assign multiple values to one variable which is causing problems in removing
Re: DestroyObject doesn't work -
meocahat - 17.07.2015
Thanks guys, i have added array and it work great. Thanks