Object Removal Code Requests 0.3D
#4

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.
Reply


Messages In This Thread
Object Removal Code Requests 0.3D - by dowster - 12.09.2011, 22:54
Re: Object Removal Code Requests 0.3D - by Vince - 12.09.2011, 23:33
Re: Object Removal Code Requests 0.3D - by dowster - 12.09.2011, 23:45
Re: Object Removal Code Requests 0.3D - by dowster - 13.09.2011, 00:07
Re: Object Removal Code Requests 0.3D - by Grant Johnston - 13.09.2011, 09:21
Re: Object Removal Code Requests 0.3D - by dowster - 13.09.2011, 20:21
Re: Object Removal Code Requests 0.3D - by RyDeR` - 13.09.2011, 20:44

Forum Jump:


Users browsing this thread: 1 Guest(s)