Trunk system telling me i am not near the car.
#8

This? I hope so. xD

pawn Код:
CMD:trunkinfo(playerid, params[])
{
    new count;
    for(new i = 1; i < sizeof(CarInfo); i++)
    {
        if(IsPlayerInRangeOfPoint(playerid, 5.0, CarInfo[i][X], CarInfo[i][Y], CarInfo[i][Z]))
        {
            count++;
        }
    }
    if(count > 0)
    {
        GetVehicleParamsEx(count,engine,lights,alarm,doors,bonnet,boot,objective);
        SetVehicleParamsEx(count,engine,lights,alarm,doors,bonnet,true,objective);
        new string[128];
        format(string, sizeof(string), "||--------------Trunk---------------||");
        SendClientMessage(playerid, COLOR_LIGHTRED, string);
        format(string, sizeof(string), "Weapon Slot 1: %d with %d ammo.", CarInfo[count][Weapon1], CarInfo[count][Weapon1Ammo]);
        SendClientMessage(playerid, COLOR_LIGHTRED, string);
        format(string, sizeof(string), "Weapon Slot 2: %d with %d ammo.", CarInfo[count][Weapon2], CarInfo[count][Weapon2Ammo]);
        SendClientMessage(playerid, COLOR_LIGHTRED, string);
        format(string, sizeof(string), "Weapon Slot 3: %d with %d ammo.", CarInfo[count][Weapon3], CarInfo[count][Weapon3Ammo]);
        SendClientMessage(playerid, COLOR_LIGHTRED, string);
        format(string, sizeof(string), "Weapon Slot 4: %d with %d ammo.", CarInfo[count][Weapon4], CarInfo[count][Weapon4Ammo]);
        SendClientMessage(playerid, COLOR_LIGHTRED, string);
        format(string, sizeof(string), "Weapon Slot 5: %d with %d ammo.", CarInfo[count][Weapon5], CarInfo[count][Weapon5Ammo]);
        SendClientMessage(playerid, COLOR_LIGHTRED, string);
        format(string, sizeof(string), "Materials: %d ", CarInfo[count][Materials]);
        SendClientMessage(playerid, COLOR_LIGHTRED, string);
        format(string, sizeof(string), "||----------------------------------||");
        SendClientMessage(playerid, COLOR_LIGHTRED, string);
    }
    return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)