28.01.2010, 15:01
pawn Код:
dcmd_alarm(playerid, params[])
{
#pragma unused params
if(Alarm[playerid] == 0)
{
SendClientMessage(playerid, RED, "Alarm Sounded");
Alarm1 = SetTimerEx("IPIAA", 500, 1, "i", playerid);
Alarm[playerid] = 1;
}
else if(Alarm[playerid] == 1)
{
SendClientMessage(playerid, RED, "Alarm Stopped");
for(new i; i<GetMaxPlayers(); i++) PlayerPlaySound(i, 1134, 0.0, 0.0, 0.0);
KillTimer(Alarm1);
}
return 1;
}
If i type /alarm again, It kills the timer and plays a wash sound and says, Alarm Stopped, ( like i wanted it to )
But if i type /alarm again, It plays a wash sound and says, Alarm stopped, But it should start the alarm again,
Why is it doing this?