10.01.2012, 23:34
(
Последний раз редактировалось Robert_Crawford; 11.01.2012 в 05:55.
Причина: I Redid The System Completely
)
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;
}