SA-MP Forums Archive
Object Removal Code Requests 0.3D - 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 Removal Code Requests 0.3D (/showthread.php?tid=282897)



Object Removal Code Requests 0.3D - dowster - 12.09.2011

I'm setting up this thread so people can post for the codes to remove objects. Please post a picture with the object pointed out, or a detailed description of what object you want the codes for.


Re: Object Removal Code Requests 0.3D - Vince - 12.09.2011

Tested it, client crashed. You stick at the init screen for quite some time, and you can actually see some objects (mainly trees) being removed in front of you before crashing with this information: http://pastebin.com/n7ZdnQH2


Re: Object Removal Code Requests 0.3D - dowster - 12.09.2011

Just wondering, what exactly assigns the ID to the object? is it in the ipl files?


Re: Object Removal Code Requests 0.3D - dowster - 13.09.2011

pawn Код:
//Testing
YCMD:wipeall(playerid, params[], help)
{
    #pragma unused help
    #pragma unused params
    new string[24];
    for (new i = 0; i != 19000; ++i)
    {
        RemoveBuildingForPlayer(playerid, i, 0.0, 0.0, 0.0, 6000.0);
        format(string, sizeof(string), "Object %i removed", i);
        SendClientMessage(playerid, 0xFF6600, string);
    }
    return 1;
}
Going to test with that code, if the client crashes it should have the last id in the chatlogs

Edit: client freezes around 300 object deletions, on my pc, probably just processing. However i did find that using my array with the object ids and basically only looping through the ids in there (Known IDs) it doesnt crash. It freezes but then when loop finishes it unfreezes, then i fall for a while and some objects are still in the game (Possible they aren't in the array) and lastly i crash. Here's the code
pawn Код:
//Testing
YCMD:wipeall(playerid, params[], help)
{
    #pragma unused help
    #pragma unused params
    new string[24];
    for (new i = 0; i < sizeof(allObjects); ++i)
    {
        RemoveBuildingForPlayer(playerid, allObjects[i][id], 0.0, 0.0, 0.0, 6000.0);
        format(string, sizeof(string), "Object %i removed", allObjects[i][id]);
        SendClientMessage(playerid, 0xFF6600, string);
    }
    return 1;
}
I'd also like to note that with the code ****** posted, in my chatlog it did indeed get messages up to object 19000, then it crashed.


Re: Object Removal Code Requests 0.3D - Grant Johnston - 13.09.2011

I Deleted a few thousand objects and tried to run the client, it crashed when it Connected. :P
Maybe there is a limit to deleted objects somehow?


Re: Object Removal Code Requests 0.3D - dowster - 13.09.2011

Yeah, ill try ******' idea later


Re: Object Removal Code Requests 0.3D - RyDeR` - 13.09.2011

<deleted due being wrong>