SA-MP Forums Archive
їPor quй el comando me dice que el jugador estб lejos? - 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: Español/Spanish (https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: їPor quй el comando me dice que el jugador estб lejos? (/showthread.php?tid=634601)



їPor quй el comando me dice que el jugador estб lejos? - Strikeskp - 22.05.2017

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;
} 



Respuesta: їPor quй el comando me dice que el jugador estб lejos? - Goncho28 - 22.05.2017

Prueba aumentando el radio a 5 o 10.