29.07.2009, 12:05
to stop the timer?
Top of script:
for the command you wanna stop it with use:
Top of script:
Код:
new KillCountDown;
Код:
if(strcmp(cmdtext, "/counter", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new tmpcar = GetPlayerVehicleID(playerid) - 1;
if(PlayerInfo[playerid][pFaction] != 255 && DynamicFactions[PlayerInfo[playerid][pFaction]][fType] == 5)
{
if(!IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COLOR_VEH, " You are not in a car.");
return 1;
}
if(DynamicCars[tmpcar][FactionCar] != PlayerInfo[playerid][pFaction])
{
SendClientMessage(playerid, COLOR_VEH, " You are not in a faction vehicle.");
return 1;
}
PlayerActionMessage(playerid,15.0,"turns on the counter.");
KillCountDown = SetTimer("countdown",500,0);
}
}
else
{
SendClientMessage(playerid, COLOR_VEH, "Invalid Faction.");
return 1;
}}
Код:
KillTimer(KillCountDown);

