// at the to
new Float:Pos[3][MAX_PLAYERS];
// gamemodeint
SetTimer("Airstrikemsg", 10000, 1);
public Airstrikemsg()
{
SendClientMessageToAll(-1, "clear your position airstike coming!");
for(new i=0;i<MAX_PLAYERS;i++)
if(IsPlayerConnected(i))
{
GetPlayerPos(i,Pos[0][i],Pos[1][i],Pos[2][i]);
}
SetTimer("Airstrikestart", 20000, 1);
return 1;
}
public Airstrikestart(playerid)
{
CreateExplosion(Pos[0][playerid], Pos[1][playerid], Pos[2][playerid], 7, 1000.0);
return 1;
}
|
Airstrikestart has a playerid argument, therefore it should be called with SetTimerEx("Airstrikestart", 20000, 1,"i",playerid);
Oh and well you don't have any playerid in Airstrikemsg, so if you want to airstrike a specific player, you should do it with i, or remove the playerid argument from airstrikestart and loop thru all players and blow them up. |
forward Airstrikemsg();
public Airstrikemsg()
{
SendClientMessageToAll(-1, "clear your position airstike coming!");
SetTimer("Airstrikestart", 20000, false);
return 1;
}
forward Airstrikestart();
public Airstrikestart()
{
for(new i=0;i<MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i))
{
GetPlayerPos(i,Pos[0][i],Pos[1][i],Pos[2][i]);
CreateExplosion(Pos[0][i], Pos[1][i], Pos[2][i], 7, 1000.0);
}
}
return 1;
}