Positions Problem
#1

I am trying to check if the player is in range of one of the dealerships and it just doesn't work.
I've encountered a problem like this one before I just don't know the solution now.

pawn Код:
YCMD:v_buy(playerid, params[], help) { //Accessing the vehicle purhcasing menu.
   
    if(PR[playerid][VehiclesOwned] >= 1) return SendClientMessage(playerid, COLOR_ERROR, "[ ! ] You already reach the maximum amount of vehicles you can have!");
    else {
        for(new i = 0 ; i < MAX_DEALERSHIPS ; i ++) { //This command doesn't work properly, fix it.
            if(IsPlayerInRangeOfPoint(playerid, 5, DS[i][DsLocX], DS[i][DsLocY], DS[i][DsLocZ])) {
                format(ZString, sizeof(ZString), "Saloon Vehicles\nStation Wagons\nIndustrial\nPublic Service\nBikes\nHelicopters\nAir Planes\nSport Vehicles");
                return 1;
            } else {
                SendClientMessage(playerid, COLOR_ERROR, "[ ! ] You are not near any dealership!");
                break;
            }
        }
        ShowPlayerDialog(playerid, DIALOG_DEALERSHIP_BUY, DIALOG_STYLE_LIST, "Vehicles DealerShip", ZString, "Purchase", "Close");
    }
    return 1;
}
Reply


Messages In This Thread
Positions Problem - by Ox1gEN - 30.12.2014, 13:18
Re: Positions Problem - by Ox1gEN - 30.12.2014, 13:35
Re: Positions Problem - by Alvord - 30.12.2014, 14:23
Re: Positions Problem - by BroZeus - 30.12.2014, 14:33
Re: Positions Problem - by Ox1gEN - 30.12.2014, 15:20

Forum Jump:


Users browsing this thread: 1 Guest(s)