15.06.2011, 00:04
pawn Код:
public TimerName()
{
if(IsPlayerConnected(playerid))
{
CreateObject(ObjectID, RandomFireSpawn[0], RandomFireSpawn[1], RandomFireSpawn[2],0, 0, 0, 0);
SetPlayerMapIcon(playerid, IConID, RandomFireSpawn[1],RandomFireSpawn[1],RandomFireSpawn[1], 55, COLOR_WHITE, 0);
SendFactionMessage(factionID, COLOR_PINK, " Dispatch: There has been a fire located within the city of LS");//This is a example code, the code you would use is what ever you use, as for /®adio for the LSFMD. Same thing, minus the string. You already have the preset text.
KillTimer(TimerName);
}
return 1;
}
//Now, for the health.
new FireHPTimer[MAX_PLAYERS];
forward HealthFire(playerid); // <- I have added a semi-colon at the end of this line
public HealthFire(playerid) // <- I have removed the semi-colon at the end of this line
{
if(IsPlayerConnected(playerid))
{
if(IsPlayerInRangeOfPoint(playerid,5.0,RandomFireSpawn[0],RandomFireSpawn[1],RandomFireSpawn[2]))
{
FireHPTimer[playerid] = SetTimerEx("FireHealthTime", 25000, false, "i", playerid);//Set for 25 seconds.
}
}
return 1;
}
forward FireHealthTime(playerid); // <- I have added a semi-colon at the end of this line
public FireHealthTime(playerid)
{
if(IsPlayerConnected(playerid))
{
new Float:health;
GetPlayerHealth(playerid, health);
SetPlayerHealth(playerid, health-25.0);//In 25 seconds, if not treated he will loose 25 HP
}
return 1;
}