[Ajuda] IsPlayerInRangeOfPoint
#1

Bom, eu estou com dificuldades para criar este comando.. Ele funciona PERFEITAMENTE, sу que, como o meu servidor й roleplay, ele deve estar obviamente perto do portгo para abrir ele.. Atй aн tudo bem.. Sу que, quando ele estб longe do portгo, o Texto aparece, mas o portгo nгo abre.. Eu queria que, quando o jogador estivesse longe, nгo abrisse o portгo, e nem aparecesse o Texto.. Sу quando ele estivesse perto, abrisse, e aparecesse a mensagem..

PHP код:
CMD:abrir(playerid)
{
    new 
string[128];
    new 
name[MAX_PLAYER_NAME];
    
GetPlayerName(playeridnamesizeof(name));
    if(
IsPlayerInRangeOfPoint(playerid2.0237.4276,115.9563,1003.2188))
    
MoveObject(pFT229.7874,115.9756,991.9190,3,0.0000,0.0000,0.0000);
    
SetTimer(#MovepFT, 5000, 0);
    
format(stringsizeof(string), "** %s aperta um botгo para abrir o portгo."name);
    
ProxDetector(5.0playeridstring,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    return 
true;

Reply
#2

PHP код:
CMD:abrir(playerid

    if(
IsPlayerInRangeOfPoint(playerid2.0237.4276,115.9563,1003.2188)) 
{
    new 
string[128]; 
    new 
name[MAX_PLAYER_NAME]; 
    
GetPlayerName(playeridnamesizeof(name)); 
    
MoveObject(pFT229.7874,115.9756,991.9190,3,0.0000,0.0000,0.0000); 
    
SetTimer(#MovepFT, 5000, 0); 
    
format(stringsizeof(string), "** %s aperta um botгo para abrir o portгo."name); 
    
ProxDetector(5.0playeridstring,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); 
}
    return 
true

Desculpe estar mal feito, estou no trabalho e nгo tenho nenhum editor aqui.
Reply
#3

Jб ouviu falar de chavetas?

PHP код:
CMD:abrir(playerid)
{
    new 
string[128];
    new 
name[MAX_PLAYER_NAME];
    
GetPlayerName(playeridnamesizeof(name));
    if(
IsPlayerInRangeOfPoint(playerid2.0237.4276,115.9563,1003.2188))
    {
        
MoveObject(pFT229.7874,115.9756,991.9190,3,0.0000,0.0000,0.0000);
        
SetTimer(#MovepFT, 5000, 0);
        
format(stringsizeof(string), "** %s aperta um botгo para abrir o portгo."name);
        
ProxDetector(5.0playeridstring,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE)
    }
    return 
true;

Reply
#4

Eu jб tentei usar as chaves, sу que estava dando erro.. e obrigado <3
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)