[Ajuda] - /Encontrar Pelo Celular
#8

Testas :
pawn Код:
if(strcmp(cmd, "/encontrar", true) == 0)
    {
        new giveplayerid = 801;
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pJob] != 1)
            {
                SendClientMessage(playerid, COLOR_GREY, "   Vocк nгo й um Detetive/ou Oficial da Policia !");
                return 1;
            }
            if(PlayerOnMission[playerid] > 0)
            {
                SendClientMessage(playerid, COLOR_GREY, "   Vocк nгo pode procurar alguem durante uma Missгo !");
                return 1;
            }
            if(UsedFind[playerid] != 0 && PlayerInfo[playerid][pDetSkill] < 401)
            {
                SendClientMessage(playerid, COLOR_GREY, "   Vocк jб procurou por alguйm, espere (2) minutos !");
                return 1;
            }
            new numero;
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USO: /encontrar [numero]");
                return 1;
            }
            numero = strval(tmp);
            for(new i = 0; i < MAX_PLAYERS; ++i)
            {
                if(IsPlayerConnected(i))
                {
                    if(PlayerInfo[i][pPnumber] == numero);
                    {
                        giveplayerid = i;
                    }
                }
            }
            if(giveplayerid != 801)
            {
                if(IsPlayerConnected(giveplayerid))
                {
                    if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "Vocк nгo pode procurar a sн mesmo!"); return 1; }
                    new points;
                    new level = PlayerInfo[playerid][pDetSkill];
                    if(level >= 0 && level <= 50)
                    { points = 5; }
                    else if(level >= 51 && level <= 100)
                    { points = 7; }
                    else if(level >= 101 && level <= 200)
                    { points = 9; }
                    else if(level >= 201 && level <= 400)
                    { points = 9; }
                    else if(level >= 401)
                    { points = 13; }
                    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                    new Float:X,Float:Y,Float:Z;
                    GetPlayerPos(giveplayerid, X,Y,Z);
                    SetPlayerCheckpoint(playerid, X,Y,Z, 5);
                    FindTime[playerid] = 1;
                    FindTimePoints[playerid] = points;
                    PlayerInfo[playerid][pDetSkill] ++;
                    UsedFind[playerid] = 1;
                    if(PlayerInfo[playerid][pDetSkill] == 50)
                    { SendClientMessage(playerid, COLOR_YELLOW, "Sua habilidade como detetive agora й nнvel 2, vocк ainda nгo estб habilitado a encontrar Membros de Faccгo"); }
                    else if(PlayerInfo[playerid][pDetSkill] == 100)
                    { SendClientMessage(playerid, COLOR_YELLOW, "Sua habilidade como detetive agora й nнvel 3, vocк ainda nгo estб habilitado a encontrar Membros de Faccгo"); }
                    else if(PlayerInfo[playerid][pDetSkill] == 200)
                    { SendClientMessage(playerid, COLOR_YELLOW, "Sua habilidade como detetive agora й nнvel 4, agora vocк estб habilitado a encontrar Membros de Faccгo"); }
                    else if(PlayerInfo[playerid][pDetSkill] == 400)
                    { SendClientMessage(playerid, COLOR_YELLOW, "Sua habilidade como detetive agora й nнvel 5, agora vocк estб habilitado a encontrar Membros de Faccгo"); }
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, "   Nome/ID Invбlido !");
            }
        }
        return 1;
    }
Reply


Messages In This Thread
[Ajuda] - /Encontrar Pelo Celular - by Felipe_Freeze - 01.05.2012, 00:10
Re: [Ajuda] - /Encontrar Pelo Celular - by Victor' - 01.05.2012, 00:56
Re: [Ajuda] - /Encontrar Pelo Celular - by Victor' - 01.05.2012, 01:03
Re: [Ajuda] - /Encontrar Pelo Celular - by Felipe_Freeze - 01.05.2012, 01:20
Re: [Ajuda] - /Encontrar Pelo Celular - by Caio_Freeze - 01.05.2012, 01:22
Re: [Ajuda] - /Encontrar Pelo Celular - by paulor - 01.05.2012, 01:37
Re: [Ajuda] - /Encontrar Pelo Celular - by Felipe_Freeze - 01.05.2012, 02:24
Re: [Ajuda] - /Encontrar Pelo Celular - by CidadeNovaRP - 01.05.2012, 02:51
Re: [Ajuda] - /Encontrar Pelo Celular - by Felipe_Freeze - 01.05.2012, 03:36
Re: [Ajuda] - /Encontrar Pelo Celular - by Jason` - 01.05.2012, 05:11

Forum Jump:


Users browsing this thread: 1 Guest(s)