їPor quй el comando me dice que el jugador estб lejos?
#1

Tengo un problema, sucede que el comando /revisarcinturon al usarlo me dice "El jugador estб lejos"

PHP код:
CMD:vercinturon(playerid, params[])
{
    new 
string[256];
    if(
sscanf(params, "u", params[0]))
    {
        
SendClientMessage(playerid, GRIS, "Uso: /vercinturon [ID]");
        return 
1;
    }
    if(!
IsPlayerConnected(params[0])) return SendClientMessage(playerid,COLOR_LIGHTRED, "* El jugador no estб conectado.");
    if(!
IsPlayerInAnyVehicle(params[0])) return SendClientMessage(playerid, COLOR_LIGHTRED, "* El jugador no estб en un vehнculo.");
    new 
Float:Pos[3];
    
GetPlayerPos(params[0], Pos[0], Pos[1], Pos[2]);
    if(
PlayerToPoint(playerid, 3, Pos[0], Pos[1], Pos[2]))
    {
        if(
TieneCinturon[params[0]] == 0)
        {
            
format(string, sizeof(string), "* %s revisa el estado del cinturуn de %s.", GetPlayerNameEx(playerid), GetPlayerNameEx(params[0]));
            
ProxDetector(15.0, playerid, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
            
format(string, sizeof(string), "* %s no lleva el cinturуn abrochado.", GetPlayerNameEx(params[0]));
            
SendClientMessage(playerid, ROJO, string);
            return 
1;
        }
        else
        {
            
format(string, sizeof(string), "* %s revisa el estado del cinturуn de %s.", GetPlayerNameEx(playerid), GetPlayerNameEx(params[0]));
            
ProxDetector(15.0, playerid, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
            
format(string, sizeof(string), "* %s lleva el cinturуn abrochado.", GetPlayerNameEx(params[0]));
            
SendClientMessage(playerid, VERDE, string);
        }
    }
    else return 
SendClientMessage(playerid, COLOR_WHITE, "* Estбs muy lejos del jugador.");
    return 
1;
} 
Reply
#2

Prueba aumentando el radio a 5 o 10.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)