[Ajuda] !IsPlayerInPlace
#1

Eai galera!!
Entгo estou com um problema no IsPlayerInPlace.
Mais precisamente no comando /carregar da profissгo piloto.
Seguinte, o cara digita /carregar mas diz que ele nгo estб na area, segue o codigo:


PHP Code:
if(strcmp("/carregar", cmdtext, true, 10) == 0)
    {
        if(!
IsPlayerInPlace(playerid, 1950.638, -2636.443, 1915.860, -2612.534)) {
            
SendClientMessage(playerid, COR_ERRO, "| ERRO | Vocк nгo esta no local de carregamento.");
            return 
1;
        }
        if(
PlayerLeo[playerid][Profissao] != PILOTO) {
            
SendClientMessage(playerid, COR_ERRO, "| ERRO | Voce nгo e um piloto!");
            return 
1;
        }
        if(
GetVehicleModel(GetPlayerVehicleID(playerid)) != 593)
        {
            
SendClientMessage(playerid, COR_ERRO, "| ERRO | Vocк nгo esta em um aviгo.");
            return 
1;
        }
        
CCP[playerid] = 1;
        
SetPlayerRaceCheckpoint(playerid, 0, 1322.6554, 1354.3180, 10.8203, 306.5969,2519.2402,16.6951, 3.0); //aero lv
        
SendClientMessage(playerid, -1, "| AEROPORTO | Vocк pegou 3 pacotes entregue-os no {FF0000}checkpoint {FFFFFF}marcado em seu mapa");
        return 
1;
    } 
Final do GM:

PHP Code:
stock IsPlayerInPlace(playerid, Float:XMin, Float:YMin, Float:XMax, Float:YMax)
{
    new
        
RetValue = 0,
        
Float:aX,
        
Float:aY,
        
Float:aZ
    
;
    
GetPlayerPos(playerid, aX, aY, aZ);
    if(
aX >= XMin && aY >= YMin && aX < XMax && aY < YMax)
    {
        
RetValue = 1;
    }
    return 
RetValue;
} 
Reply


Messages In This Thread
!IsPlayerInPlace - by iAplle - 22.03.2019, 19:13
Re: !IsPlayerInPlace - by ipsLuan - 22.03.2019, 20:33
Re: !IsPlayerInPlace - by JeffSantos2 - 23.03.2019, 03:45
Re: !IsPlayerInPlace - by iAplle - 23.03.2019, 12:34
Re: !IsPlayerInPlace - by iAplle - 23.03.2019, 12:36

Forum Jump:


Users browsing this thread: 1 Guest(s)