Timers stops working
#1

Hello!

i have a timer for auto repair pickup, it works a couple of times and then it stop works, you can pick it up but your vehicle doesn't get repaired.
And i also found a mine script by "Studio FS(Games and Apec)" it counts down from 10 to 0 to activate the mines, if you walk near it, it explode. But also that one stops working after a while, it counts to 0..but no explode when you comes near it.

What can cause these timers to braking down?
If you need to see my pickups codes, just tell me.
Reply
#2

Can you show the coding?
Reply
#3

Here it is for the repair pickups.

Code:
pawn Код:
forward pickup();
    SetTimer("pickup",5000,true);

public pickup()
{
    newplayer = CreatePickup(1240,14,405.8782,2460.9792,17.2118,-1);
    airwolves = CreatePickup(1240,14,1619.4607,1337.4252,10.8095,-1);
    bluefoxes = CreatePickup(1240,14,1874.7584,-2288.3972,14.2586,-1);
    thunderbirds = CreatePickup(1240,14,-1372.7068,-214.9956,14.1484,-1);
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == newplayer)
    {
        if(GetPlayerTeam(playerid) == 0)
        {
            RepairVehicle(GetPlayerVehicleID(playerid));
            SendClientMessage(playerid, 0x33AA33AA, "Your vehicle has been repaired!");
            return 1;}
        }
    else if(pickupid == airwolves)
    {
        if(GetPlayerTeam(playerid) == 1)
        {
            RepairVehicle(GetPlayerVehicleID(playerid));
            SendClientMessage(playerid, 0x33AA33AA, "Your vehicle has been repaired!");
            return 1;}
        }
    else if(pickupid == bluefoxes)
    {
        if(GetPlayerTeam(playerid) == 2)
        {
            RepairVehicle(GetPlayerVehicleID(playerid));
            SendClientMessage(playerid, 0x33AA33AA, "Your vehicle has been repaired!");
            return 1;}
        }
    else if(pickupid == thunderbirds)
    {
        if(GetPlayerTeam(playerid) == 3)
        {
            RepairVehicle(GetPlayerVehicleID(playerid));
            SendClientMessage(playerid, 0x33AA33AA, "Your vehicle has been repaired!");
            return 1;}
        }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)