SA-MP Forums Archive
RemoveBuildingForPlayer (Everything in the map?) - 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: RemoveBuildingForPlayer (Everything in the map?) (/showthread.php?tid=283607)



RemoveBuildingForPlayer (Everything in the map?) - Baboon - 15.09.2011

for(new i = 300; i < 15000; i++)
{
if(IsValidObject(i))
{
RemoveBuildingForPlayer(playerid, i, 0.0, 0.0, 0.0, 6000.0);
}
}

Somehow this is not working, it won't remove every building for the player.


Re: RemoveBuildingForPlayer (Everything in the map?) - Mean - 15.09.2011

Maybe there are more than 15000 objects in GTASA (which there surely are).


Re: RemoveBuildingForPlayer (Everything in the map?) - Jay_ - 15.09.2011

IsValidObject checks that the specified object ID is valid, not model ID.


Re: RemoveBuildingForPlayer (Everything in the map?) - Baboon - 15.09.2011

oh so I should try to use the model id function?


Re: RemoveBuildingForPlayer (Everything in the map?) - Retardedwolf - 15.09.2011

Yes, I have tried this and there are 17000+ models, try doing 300-20000