destroy object help!!!
#2

That is because you lose your object reference!
What you need to do since you can rob multiple stores is create a clean up function and call it on a timer instead for instance.

pawn Код:
SetTimeEx("CleanupStore", 60000, false, "ii", storeid, objectid);
Pretty simple to do here is some more ideas.

pawn Код:
CreateLocker(playerid)
{
    new Locker = 1829;
    new Float:pos[3];
    new Float:Angle;
    new pworld = GetPlayerVirtualWorld(playerid);
    new pint = GetPlayerInterior(playerid);
    GetPlayerFacingAngle(playerid, Angle);
    GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
    pos[0] += (1 * floatsin(-Angle, degrees));
    pos[1] += (1 * floatcos(-Angle, degrees));
    return CreateDynamicObject(Locker,pos[0],pos[1],pos[2],0,0,Angle,pworld,pint);
}
So I changed it to return the objectid that is created in the streamer so you can supply that return value in your timer. I am guessing that you would have another function that calls CreateLocker() so that is where you will want to initiate your timer to clean up.
Reply


Messages In This Thread
destroy object help!!! - by JawsPlus - 16.12.2014, 03:58
Re: destroy object help!!! - by Pottus - 16.12.2014, 04:08
Re: destroy object help!!! - by JawsPlus - 16.12.2014, 04:51
Re: destroy object help!!! - by Pottus - 16.12.2014, 05:39
Re: destroy object help!!! - by JawsPlus - 16.12.2014, 05:55

Forum Jump:


Users browsing this thread: 1 Guest(s)