[Ajuda] No Capo
#1

pawn Code:
if(strcmp(tmp,"neon",true) == 0)
    {
        if(IsPlayerInAnyVehicle(playerid))
            return SendClientMessage(playerid,COLOR_LIGHTRED,"USE:{C5C3C1} Você precisa estar fora do veiculo.");

        for(new i = 0; i < MAX_VEHICLES; i ++)
        {
            if (!IsPlayerNearHood(playerid, i)) return SendClientMessage(playerid,COLOR_LIGHTRED, "{FF4F4F}ERRO:{FFFFFF} Você não está próximo a nenhum capo!");
            //INSTALAR NEON
        }
    }


    stock IsPlayerNearHood(playerid, vehicleid)
{
    static
        Float:fX,
        Float:fY,
        Float:fZ;

    GetVehicleHood(vehicleid, fX, fY, fZ);
    return (GetPlayerVirtualWorld(playerid) == GetVehicleVirtualWorld(vehicleid)) && IsPlayerInRangeOfPoint(playerid, 3.0, fX, fY, fZ);
}
Alguem ajuda? está dando que o o jogador não está na frente do capo do veículo
Reply
#2

Como está GetVehicleHood?
Reply
#3

Quote:
Originally Posted by ipsLuan
View Post
Como estб GetVehicleHood?
Uso a inclube EVF man
Reply
#4

Quote:
Originally Posted by Syxh0wN
View Post
Uso a inclube EVF man
Jб tentou algo como:

PHP Code:
    if(strcmp(tmp,"neon",true) == 0)
    {
        if(
IsPlayerInAnyVehicle(playerid))
            return 
SendClientMessage(playerid,COLOR_LIGHTRED,"USE:{C5C3C1} Vocк precisa estar fora do veiculo.");
        new 
contar 0;
        for(new 
0MAX_VEHICLES++) 
        {
            if (
IsPlayerNearHood(playeridi))
            {
                 
contar ++;
                 
//codigo de instalar neon
                 
break;
            }
        }
        if(
contar == 0) return SendClientMessage(playerid,COLOR_LIGHTRED"{FF4F4F}ERRO:{FFFFFF} Vocк nгo estб prуximo a nenhum capo!");
        return 
1;
    } 
?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)