03.10.2015, 05:24
Hi, I have a problem with /v. Sometimes it works, sometimes I say, "You not have a vehicles.".
Код HTML:
CMD:v(playerid, params []) { new bool:found = false, msg[356], lst[19]; msg = "Name\tStatus\tPlate"; for(new i = 1, j = GetVehiclePoolSize(); i <= j; i++) { if(Veh[i][Owner] == pInfo[playerid][pID]) { found = true; if(Veh[i][Lock] == 0) { lst = "{00BA19}Unlocked"; } else if(Veh[i][Lock] == 1) { lst = "{BD0000}Locked"; } format(msg, sizeof(msg), "%s\n%s\t%s\t%s", msg, g_VehicleNames[GetVehicleModel(Veh[i][ServerID])-400], lst, Veh[i][Plate]); } } if(found) { ShowPlayerDialog(playerid, DIALOG_V, DIALOG_STYLE_TABLIST_HEADERS, "My Vehicles", msg, "Select", "Cancel"); } else { SendClientMessage(playerid, COLOR_DARKGRAY, "You not have a vehicles."); } return 1; }