CMD:car(playerid, params[])
{
if(!LoggedIn[playerid]) return true;
new Float:dist = 5.0;
new count = 0, test[MAX_CARS], desc[MAX_CARS][32], h = PlayerCar[playerid], Float:x, Float:y, Float:z;
for(new f = 0; f < MAX_CARS; f++)
{
if(CarData[h][CarModel][f] > 400 && CarData[h][CarSpawned][f] == 1)
{
GetVehiclePos(CarData[h][CarVID][f], x, y, z);
if(IsPlayerInRangeOfPoint(playerid, dist, x, y, z))
{
test[count] = CarData[h][CarModel][f];
format(desc[count], 32, "%s", GetVehicleName(CarData[h][CarModel][f]));
count++;
}
}
}
if(count > 0)
{
ShowModelSelectionMenuEx(playerid, desc, count, "Select Car", MODEL_SELECTION_SCAR, 0.0, 0.0, 90.0);
carRadius[playerid] = dist;
}
return true;
}
CMD:car(playerid, params[]) { if(!LoggedIn[playerid]) return true; new Float:dist = 5.0, count = 0; new count = 0, test[MAX_CARS], desc[MAX_CARS][32], h = PlayerCar[playerid], Float:x, Float:y, Float:z; for(new f = 0; f < MAX_CARS; f++) { if(CarData[h][CarModel][f] > 400 && CarData[h][CarSpawned][f] == 1) { GetVehiclePos(CarData[h][CarVID][f], x, y, z); if(IsPlayerInRangeOfPoint(playerid, dist, x, y, z)) { test[count] = CarData[h][CarModel][f]; format(desc[count], 32, "%s", GetVehicleName(CarData[h][CarModel][f])); count++; } } } if(count > 0) { ShowModelSelectionMenuEx(playerid, desc, count, "Select Car", MODEL_SELECTION_SCAR, 0.0, 0.0, 90.0); carRadius[playerid] = dist; } return true; }
Код:
CMD:car(playerid, params[]) { if(!LoggedIn[playerid]) return true; new Float:dist = 5.0, count = 0; new count = 0, test[MAX_CARS], desc[MAX_CARS][32], h = PlayerCar[playerid], Float:x, Float:y, Float:z; for(new f = 0; f < MAX_CARS; f++) { if(CarData[h][CarModel][f] > 400 && CarData[h][CarSpawned][f] == 1) { GetVehiclePos(CarData[h][CarVID][f], x, y, z); if(IsPlayerInRangeOfPoint(playerid, dist, x, y, z)) { test[count] = CarData[h][CarModel][f]; format(desc[count], 32, "%s", GetVehicleName(CarData[h][CarModel][f])); count++; } } } if(count > 0) { ShowModelSelectionMenuEx(playerid, desc, count, "Select Car", MODEL_SELECTION_SCAR, 0.0, 0.0, 90.0); carRadius[playerid] = dist; } return true; } |
ShowModelSelectionMenuEx(playerid, items_array[], item_amount, header_text[], extraid, Float:Xrot = 0.0, Float:Yrot = 0.0, Float:Zrot = 0.0, Float:mZoom = 1.0, dialogBGcolor = 0x4A5A6BBB, previewBGcolor = 0x88888899 , tdSelectionColor = 0xFFFF00AA)
ShowModelSelectionMenuEx(playerid, desc, count, "Select Car", MODEL_SELECTION_SCAR, 0.0, 0.0, 90.0);
ShowModelSelectionMenuEx(playerid, desc[count], count, "Select Car", MODEL_SELECTION_SCAR, 0.0, 0.0, 90.0);