killtimer errors..
#5

im using the fs drunklevel thing..

pawn Код:
public CheckPointCheck()
{
    for(new a = 0; a < MAX_PLAYERS; a++)
    {
        if(IsPlayerConnected(a) == 0) continue;

        new Float:X, Float:Y, Float:Z, radius = 8, disable;
        GetPlayerPos(a, X, Y, Z);
       
        for(new b = 0; b < 11; b++)
        {
            if((X - radius < CPP[b][0] && X + radius > CPP[b][0]) && (Y - radius < CPP[b][1] && Y + radius > CPP[b][1]) && (Z - radius < CPP[b][2] && Z + radius > CPP[b][2]))
            {
                disable = 1;
           
                if(PlayerInfo[a][CheckSet] == 1) continue;
                PlayerInfo[a][CheckSet] = 1;

                SetPlayerCheckpoint(a, CPP[b][0], CPP[b][1], CPP[b][2], 2);
            }
        }

        if(disable == 0)
        {
            PlayerInfo[a][CheckSet] = 0;
            DisablePlayerCheckpoint(a);
        }
    }
}

public BloodAlcoholLevel()
{
    new Float:DrunkFloatValue;
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(PlayerInfo[i][DrinkingType] == 7)
        {
            SetPlayerHealth(i, 0);
            continue;
        }
   
        if(GetPlayerDrunkLevel(i) >= 50000)
        {
            ApplyAnimation(i,"PARACHUTE", "FALL_skyDive_DIE", 4.1, 0, 1, 1, 1, 1);
            PlayerInfo[i][DrinkingType] = 7;
            continue;
        }

        if(IsPlayerConnected(i) == 0) continue;
        TextDrawHideForPlayer(i, Menu5);
       
        if(GetPlayerDrunkLevel(i) > 0)
        {
            SetPlayerDrunkLevel(i, GetPlayerDrunkLevel(i) - 200);
            DrunkFloatValue = GetPlayerDrunkLevel(i);
       
            new string[128];
            format(string, sizeof(string), "~w~Blood Alcohol Level: ~w~%0.2f~n~~w~0.40 means death!", DrunkFloatValue / 50000 / 2.5);
            TextDrawSetString(Menu5, string);
            TextDrawShowForPlayer(i, Menu5);
        }

        if(GetPlayerDrunkLevel(i) > 40000) if(random(20) == 0) ApplyAnimation(i, "PED", "WALK_DRUNK", 4.1, 1, 1, 1, 1, 1);
    }
}
Reply


Messages In This Thread
killtimer errors.. - by Kar - 12.07.2010, 23:18
Re: killtimer errors.. - by oliverrud - 12.07.2010, 23:21
Re: killtimer errors.. - by Kar - 12.07.2010, 23:33
Re: killtimer errors.. - by RyDeR` - 12.07.2010, 23:38
Re: killtimer errors.. - by Kar - 12.07.2010, 23:42
Re: killtimer errors.. - by RyDeR` - 12.07.2010, 23:52
Re: killtimer errors.. - by Kar - 12.07.2010, 23:56

Forum Jump:


Users browsing this thread: 1 Guest(s)