DestroyObject Not Working,
#2

Quote:
Originally Posted by External-Life
Посмотреть сообщение
Ok, so i'm working on this code and it works for the most part just when the script goes to destroy the object it doesnt....

Код:
forward WearArmor(playerid);
Код:
SetTimerEx("WearArmor", 100, true, "is", playerid);
Код:
public WearArmor(playerid)
{
	new Float:armorstatus;
	GetPlayerArmour(playerid, armorstatus);
	if(armorstatus >= 1)
	{
		armorvest[playerid] =  CreateObject(373,0,0,0,0,0,0);
		AttachObjectToPlayer(armorvest[playerid], playerid, 0, 0, 0.5, 0, 5, 0);
	}
	else
	{
		DestroyObject(armorvest[playerid]);
	}
	return 1;
}
The object just never get's destroyed when the armor get's below 1
How do you even set the armorstatus variable to lower then 1 ?
Reply


Messages In This Thread
DestroyObject Not Working, - by External-Life - 20.02.2011, 21:35
Re: DestroyObject Not Working, - by Cameltoe - 20.02.2011, 21:38
Re: DestroyObject Not Working, - by External-Life - 20.02.2011, 21:41

Forum Jump:


Users browsing this thread: 1 Guest(s)