object is destroyed but still valid??
#1

Код:
CMD:obj(playerid)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x,y,z);
if(!IsValidDynamicObject(Object[playerid]))
	{
    Object[playerid]=CreateObject(866, x, y, z, 0, 0,0, 50);
    SetTimerEx("Destroy", 2000, false, "i", playerid);
	}
return 1;
}


forward Destroy(playerid);
public Destroy(playerid)
{
DestroyObject(Object[playerid]);
}
So it creates object and destroys it after 2 seconds. But when I try to create object again it won't let me even though it should since I destroyed Object[playerid] so it is not valid
Reply


Messages In This Thread
object is destroyed but still valid?? - by ax1 - 08.05.2016, 15:37
Re: object is destroyed but still valid?? - by paul988 - 08.05.2016, 15:56
Re: object is destroyed but still valid?? - by ikey07 - 08.05.2016, 16:01
Re: object is destroyed but still valid?? - by jlalt - 08.05.2016, 16:04
Re: object is destroyed but still valid?? - by AbyssMorgan - 09.05.2016, 15:43

Forum Jump:


Users browsing this thread: 2 Guest(s)