Problema con /seguro
#1

Hola, mн problema es este...
No detecta si el auto cercano es del propietario, sea igual si esta al lado y es el ъnico vehiculo en el server...
He buscado pero nada de lo que encontrй me sirve, o no es lo que necesito...
La mayorнa son sistemas de vehiculos que solo se puede tener un vehiculo, Gracias. Codigo:
pawn Код:
CMD:seguro(playerid, params[])
{
    if(Logueado[playerid] == 0) return SendClientMessage(playerid, -1, "{47D751}« ! » {FFFFFF}No estas logueado");
    new Float:pos[3];
    for(new i = 0; i < MAX_VEHICLES; i ++)
    {
        if(strcmp(cInformacion[i][cOwner], NombreJ(playerid)) == 0)
        {
            GetVehiclePos(i, pos[0], pos[1], pos[2]);
            if(IsPlayerInRangeOfPoint(i, 5 ,pos[0], pos[1], pos[2]))
            {
                new engine, lights, alarm, doors, bonnet, boot, objective, string[128];
                GetVehicleParamsEx(i, engine, lights, alarm, doors, bonnet, boot, objective);
                if(doors == 0)
                {
                    cInformacion[i][cLocked] = 1;
                    SetVehicleParamsEx(i, engine, lights, alarm, 1, bonnet, boot, objective);
                    format(string, sizeof(string), "** %s cerrу su vehiculo", NombreIC(playerid));
                }
                else
                {
                    cInformacion[i][cLocked] = 0;
                    SetVehicleParamsEx(i, engine, lights, alarm, 0, bonnet, boot, objective);
                    format(string, sizeof(string), "** %s abriу su vehiculo", NombreIC(playerid));
                }
                ProxDetector(5, playerid, string, 0xCC2EFAFF, 0xCC2EFAFF, 0xCC2EFAFF, 0xCC2EFAFF, 0xCC2EFAFF);
            }
            else return SendClientMessage(playerid, -1, "No estas cerca de ningun vehiculo tuyo");
        }
    }
    return 1;
}
Reply


Messages In This Thread
Problema con /seguro - by FullCircle - 26.07.2014, 18:13
Respuesta: Problema con /seguro - by FullCircle - 27.07.2014, 20:48

Forum Jump:


Users browsing this thread: 1 Guest(s)