CreateObject
#1

I am working with a RP server, and I want to do mapping IC, so every day, a bit is added..it also takes off the workload for mapping a little bit. But I do not want to have to restart the server, is there a way to remove all the objects OnFilterScriptExit without doing like new qwe = CreateObject w/e..like in one function? Because I have about 2000 objects currently
Reply
#2

You can "ObjectArray[0] = CreateObject"(the next object would be ObjectArray[1] and goes on) each object so they will have an ID and then you can use DestroyObject on a loop like
pawn Код:
loop sizeof(ObjectsArray)
DestroyObject(ObjectArray[i]);
Reply
#3

Yeah, but if possible, I do not wanna spend hours adding IDs to object :P
Reply
#4

pawn Код:
for( new i = 0; i < MAX_OBJECTS; i ++ )
    if( IsValidObject( i ) )
        DestroyObject( i );
Reply
#5

Thanks, but im a noob in this shit, just post on filterscript exit and thats all?
Reply
#6

Whoever can tell me +rep, I dont wanna have to go and label every object, for the thing above, is that all I need?
Reply
#7

Yes, just place that piece of script in OnFilterScriptExit and it will remove EVERY valid object when the filterscript is unloaded.
Reply
#8

Thanks buddy, +rep you all, if you even care
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)