PDA

View Full Version : Fire can't be closed?


Gooday
29/12/2011, 07:48 PM
CMD:createfire(playerid,params[])
{
new number, atrb = atblock[playerid];
new Float:X, Float:Y, Float:Z, Float:A;
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, A);
if(atblock[playerid] < MAX_ROADBLOCKS)
{
block[atrb][playerid] = CreateObject(18688, X, Y+1, Z-0.5,0,0,A);
GameTextForPlayer(playerid,"~w~Fire ~b~Created!",3000,1);
#if SEND == true
GetPlayerName(playerid,pName,32);
format(string,sizeof (string)," %s added a roadblock(%i).",pName,number);
SendClientMessageToAll(COLOR_GREEN, string);
#else
SetTimerEx("ExpireRoadblock", EXPIRE_MINUTES*60000, false, "i", block[atrb][playerid]);
atblock[playerid] += 1;
#endif
} else {
format(string,sizeof string,"You cannot place more then %i Roadblocks!",MAX_ROADBLOCKS);
SendClientMessage(playerid, COLOR_RED, string);
}
return 1;
}

When i spawn it can't be extiingued, how i can make the fire like in some server 100/100 fire then if you put some water 80/100.. and extingue it?
Anyone please? i need to set the "fire health"