DestroyActor() not working.
#1

I created an actor and tried to delete it using DestroyActor() but the actor does not seem to disappear.

pawn Код:
// Actor test

#include <a_samp>
#include <a_actor>

new gActor = INVALID_ACTOR_ID;

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (!strcmp(cmdtext, "/add"))
    {
        if (gActor == INVALID_ACTOR_ID)
        {
            gActor = CreateActor(299, 0.0, 0.0, 10.0, 0.0);
        }  
        return 1;
    }
    if (!strcmp(cmdtext, "/delete"))
    {
        DestroyActor(gActor);
        return 1;
    }
    return 0;
}
Reply


Messages In This Thread
DestroyActor() not working. - by Emmet_ - 27.04.2015, 09:19
Re: DestroyActor() not working. - by Dragony92 - 27.04.2015, 09:42
Re: DestroyActor() not working. - by Michael@Belgium - 27.04.2015, 12:00
Re: DestroyActor() not working. - by Dragony92 - 27.04.2015, 12:11
Re: DestroyActor() not working. - by PT - 27.04.2015, 13:34
Re: DestroyActor() not working. - by Emmet_ - 27.04.2015, 14:05
Re: DestroyActor() not working. - by eXeDev - 27.04.2015, 14:07
Re: DestroyActor() not working. - by J4Rr3x - 27.04.2015, 14:14
Re: DestroyActor() not working. - by Tamer - 27.04.2015, 14:16
Re: DestroyActor() not working. - by TommyB - 27.04.2015, 15:33

Forum Jump:


Users browsing this thread: 1 Guest(s)