[Ajuda] /procurar bugado
#1

Gente eu peguei este comando aqui no fуrum sу que como o autor deste mod tipo nгo o responde desde de 2011 optei por criar o tуpico porque eu nгo sou pro em pawno eu sei que vгo falar a vai la e faz e se vira eu estou tentando juro eu estou mais o que acontece e que este comando funciona de boa sу que quando eu chego perto do check-point do /procurar ele some de boa mais o tempo do /procurar nгo some se eu passar encima do check-point sу quando realmente a contagem termina eu queria arrumar isso se alguйm que puder ajudar eu agradeceria.

Код:
//No OnPlayerCommandText:

if(strcmp(cmd, "/procurar", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pEmprego] != 1)
            {
                SendClientMessage(playerid, COLOR_GREY, "   Vocк nгo й Detetive !");
                return 1;
            }
            if(UsedFind[playerid] != 0 && PlayerInfo[playerid][pDetSkill] < 401)
            {
                SendClientMessage(playerid, COLOR_GREY, "   Vocк sу pode procurar novamente, daqui a 2 Minutos !");
                return 1;
            }
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USE: /procurar [ id ]");
                return 1;
            }
            giveplayerid = ReturnUser(tmp);
            if(IsPlayerConnected(giveplayerid))
            {
                if(giveplayerid != INVALID_PLAYER_ID)
                {
                    if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "Vocк nгo pode se procurar!"); return 1; }
                    new points;
                    new level = PlayerInfo[playerid][pDetSkill];
                    if(level >= 0 && level <= 50)
                    { points = 4; }
                    else if(level >= 51 && level <= 100)
                    { points = 6; }
                    else if(level >= 101 && level <= 200)
                    { points = 8; }
                    else if(level >= 201 && level <= 400)
                    { points = 10; }
                    else if(level >= 401)
                    { points = 60; }
                    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                    KillTimer(GetPVarInt(playerid,"TimerProcura"));
                    DisablePlayerCheckpoint(playerid);
                    DeletePVar(playerid,"TimerProcura");
                    new TimerProcura;
                    TimerProcura = SetTimerEx("GivePlayerIDCheckpoint", 1000, true, "di", playerid, giveplayerid);
                    SetPVarInt(playerid,"TimerProcura",TimerProcura);
                    FindTime[playerid] = 1;
                    FindTimePoints[playerid] = points;
                    PlayerInfo[playerid][pDetSkill] ++;
                    UsedFind[playerid] = 1;
                    if(PlayerInfo[playerid][pDetSkill] == 50)
                    { SendClientMessage(playerid, COLOR_YELLOW, "* Seu nivel de detetive agora й 2, Vocк pode procurar mais rapido e encontrar mais rapido."); }
                    else if(PlayerInfo[playerid][pDetSkill] == 100)
                    { SendClientMessage(playerid, COLOR_YELLOW, "* Seu nivel de detetive agora й 3, Vocк pode procurar mais rapido e encontrar mais rapido."); }
                    else if(PlayerInfo[playerid][pDetSkill] == 200)
                    { SendClientMessage(playerid, COLOR_YELLOW, "* Seu nivel de detetive agora й 4, Vocк pode procurar mais rapido e encontrar mais rapido."); }
                    else if(PlayerInfo[playerid][pDetSkill] == 400)
                    { SendClientMessage(playerid, COLOR_YELLOW, "* Seu nivel de detetive agora й 5, Vocк pode procurar mais rapido e encontrar mais rapido."); }
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, "   Invalido NICK/ID !");
            }
        }
        return 1;
    }




//No OnPlayerEnterCheckpoint:


if(IsPlayerInRangeOfPoint(playerid,10.0,GetPVarFloat(playerid,"FocoX"), GetPVarFloat(playerid,"FocoY"), GetPVarFloat(playerid,"FocoZ")))
    {
        DisablePlayerCheckpoint(playerid);
        DeletePVar(playerid,"FocoX");
        DeletePVar(playerid,"FocoY");
        DeletePVar(playerid,"FocoZ");
        KillTimer(GetPVarInt(playerid,"TimerProcura"));
    }






//No Final do GM:


forward GivePlayerIDCheckpoint(playerid, giveplayerid);
public GivePlayerIDCheckpoint(playerid, giveplayerid)
{
    DisablePlayerCheckpoint(playerid);
    new Float:X,Float:Y,Float:Z;
    GetPlayerPos(giveplayerid, X,Y,Z);
    DeletePVar(playerid,"FocoX");
    DeletePVar(playerid,"FocoY");
    DeletePVar(playerid,"FocoZ");
    SetPVarFloat(playerid,"FocoX",X);
    SetPVarFloat(playerid,"FocoY",Y);
    SetPVarFloat(playerid,"FocoZ",Z);
    SetPlayerCheckpoint(playerid, X,Y,Z, 6);
    return 1;
}
Reply


Messages In This Thread
/procurar bugado - by S4K4N4S - 23.06.2014, 03:19
Re: /procurar bugado - by unamed - 23.06.2014, 07:45
Re: /procurar bugado - by S4K4N4S - 25.06.2014, 13:29

Forum Jump:


Users browsing this thread: 1 Guest(s)