Fire Spawn System
#7

As you can see i redid the code i am still returning that warning and the code does not function.
pawn Код:
//----------------------
new Float:RandomFireSpawn[4][3] =
{
    {-1289.0140, 2467.1531, 87.3671, 24.7645},
    {-1310.2850, 2513.6919, 87.0474, 134.5772},
    {-1318.5570, 2524.3293, 87.4575, 332.7508},
    {-1308.0326, 2549.6951, 90.3281, 145.3758}
};

//-------------------- This Is Used To Show The Time Is Set Under Game Modeinit
public OnGameModeInit() {
    SetTimer("RandomFireSpawn", 100000, true);
}
return 1;
}
//---------------------
public FireTimer()
{
    if(IsPlayerConnected(playerid))
    {
        RandomFireSpawn(playerid);
        KillTimer(TimerName);
    }
    return 1;
}

public RandomFireSpawn(playerid)
        {
        new rand= random(sizeof(RandomFireSpawn));
        CreateObject(1234, RandomFireSpawn[0], RandomFireSpawn[1], RandomFireSpawn[2],0, 0, 0, 0);
        SetPlayerMapIcon(playerid, 18, RandomFireSpawn[1],RandomFireSpawn[1],RandomFireSpawn[1], 55, COLOR_WHITE, 0);
            if(groupVariables[playerVariables[playerid][pGroup]][gGroupType] != 3)
                {
                SendClientMessage(playerid, COLOR_GREEN, "Dispatch: A Fire Has Been Located Please Respond We Have Set A Icon.");
                }
        }
        return 1;
}
//Now, for the health.
new FireHPTimer[MAX_PLAYERS];
forward HealthFire(playerid)
public HealthFire(playerid);
{
    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)
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;
}
Reply


Messages In This Thread
Fire Spawn System - by Robert_Crawford - 10.01.2012, 17:10
Re: Fire Spawn System - by LiamM - 10.01.2012, 17:35
Re: Fire Spawn System - by Robert_Crawford - 10.01.2012, 19:10
Re: Fire Spawn System - by LiamM - 10.01.2012, 19:35
Re: Fire Spawn System - by Robert_Crawford - 10.01.2012, 22:40
Re: Fire Spawn System - by Basssiiie - 10.01.2012, 22:43
Re: Fire Spawn System - by Robert_Crawford - 10.01.2012, 23:34
Re: Fire Spawn System - by Robert_Crawford - 11.01.2012, 18:55
AW: Fire Spawn System - by Ubuntu - 11.01.2012, 19:19
Re: Fire Spawn System - by Basssiiie - 11.01.2012, 21:18

Forum Jump:


Users browsing this thread: 5 Guest(s)