SA-MP Forums Archive
[AJUDA] /PROCURAR - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [AJUDA] /PROCURAR (/showthread.php?tid=285389)



[AJUDA] /PROCURAR - Leo_Lost - 23.09.2011

PHP код:
    }
    if(
strcmp(cmd"/procurar"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            if(
PlayerInfo[playerid][pEmprego] != 1)
            {
                
SendClientMessage(playeridCOLOR_GREY"   Voce nao e detetive !");
                return 
1;
            }
            if(
PlayerOnMission[playerid] > 0)
            {
                
SendClientMessage(playeridCOLOR_GREY"   Voce esta em uma missao, nao pode usar este comando !");
                return 
1;
            }
            if(
UsedFind[playerid] != && PlayerInfo[playerid][pDetSkill] < 401)
            {
                
SendClientMessage(playeridCOLOR_GREY"   Voce so pode procurar novamente, daqui 2 Minutos !");
                return 
1;
            }
            
tmp strtok(cmdtextidx);
            if(!
strlen(tmp))
            {
                
SendClientMessage(playeridCOLOR_GRAD2"USE: /procurar [ id ]");
                return 
1;
            }
            
giveplayerid ReturnUser(tmp);
            if(
IsPlayerConnected(giveplayerid))
            {
                if(
giveplayerid != INVALID_PLAYER_ID)
                {
                    if(
giveplayerid == playerid) { SendClientMessage(playeridCOLOR_GREY"Voce nao pode se procurar!"); return 1; }
                    new 
points;
                    new 
level PlayerInfo[playerid][pDetSkill];
                    if(
level >= && level <= 50)
                    { 
points 10; }
                    else if(
level >= 51 && level <= 100)
                    { 
points 15; }
                    else if(
level >= 101 && level <= 200)
                    { 
points 25; }
                    else if(
level >= 201 && level <= 400)
                    { 
points 30; }
                    else if(
level >= 401)
                    { 
points 35; }
                    
GetPlayerName(giveplayeridgiveplayersizeof(giveplayer));
                    new 
Float:X,Float:Y,Float:Z;
                    new 
Mensagem[55];
                    if(
IsPlayerInAnyVehicle(playerid))
                    {
                        new 
FloatDistanciaV GetVehicleDistanceFromPoint(GetPlayerVehicleID(playerid), XYZ);
                        
format(Mensagemsizeof(Mensagem), "Vocк Estб %f de Distвncia do Seu Procurado."DistanciaV);
                        
SendClientMessage(playerid, -1Mensagem);
                    }
                    if(!
IsPlayerInAnyVehicle(playerid))
                    {
                        new 
FloatDistanciaP GetPlayerDistanceFromPoint(playerid237.9115.61010.2);
                        
format(Mensagemsizeof(Mensagem), "Vocк Estб %f de Distвncia do Seu Procurado."DistanciaP);
                        
SendClientMessage(playerid, -1Mensagem);
                    }
                    
GetPlayerPos(giveplayeridX,Y,Z);
                    
SetPlayerCheckpoint(playeridX,Y,Z6);
                    
FindTime[playerid] = 1;
                    
FindTimePoints[playerid] = points;
                    
PlayerInfo[playerid][pDetSkill] ++;
                    
UsedFind[playerid] = 1;
                    if(
PlayerInfo[playerid][pDetSkill] == 50)
                    { 
SendClientMessage(playeridCOLOR_YELLOW"* Seu nivel de detetive agora й 2, Voce pode procurar mais rapido e encontrar mais rapido."); }
                    else if(
PlayerInfo[playerid][pDetSkill] == 100)
                    { 
SendClientMessage(playeridCOLOR_YELLOW"* Seu nivel de detetive agora й 3, Voce pode procurar mais rapido e encontrar mais rapido."); }
                    else if(
PlayerInfo[playerid][pDetSkill] == 200)
                    { 
SendClientMessage(playeridCOLOR_YELLOW"* Seu nivel de detetive agora й 4, Voce pode procurar mais rapido e encontrar mais rapido."); }
                    else if(
PlayerInfo[playerid][pDetSkill] == 400)
                    { 
SendClientMessage(playeridCOLOR_YELLOW"* Seu nivel de detetive agora й 5, Voce pode procurar mais rapido e encontrar mais rapido."); }
                }
            }
            else
            {
                
SendClientMessage(playeridCOLOR_GREY"   Invalido NICK/ID !");
            }
        }
        return 
1;
    } 
Nao sei pq ta dando esses erros aki:
D:\GM ATUAL BGS\gamemodes\GmLeo.pwn(42096) : error 017: undefined symbol "GetVehicleDistanceFromPoint"
D:\GM ATUAL BGS\gamemodes\GmLeo.pwn(42102) : error 017: undefined symbol "GetPlayerDistanceFromPoint"


Re: [AJUDA] /PROCURAR - [O.z]Caroline - 23.09.2011

pawn Код:
native GetPlayerDistanceFromPoint(playerid, Float:X, Float:Y, Float:Z);
native GetVehicleDistanceFromPoint(vehicleid, Float:X, Float:Y, Float:Z);