27.04.2015, 09:19
(
Последний раз редактировалось Emmet_; 27.04.2015 в 14:05.
)
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;
}