22.12.2015, 11:16
VehicleColor[playerid][0] = colort;
VehicleColor[playerid][1] = colort;
If I /v park the vehicle and spawn it back the colors will reset
but this one is saving
VehicleColor[playerid][1] = colort;
If I /v park the vehicle and spawn it back the colors will reset
but this one is saving
Код:
case DIALOG_COLOR1: { if(GetPlayerMoney(playerid) < 99) return SCM(playerid, COLOR_LIGHTRED, "You do not have enough money."); new vehicleid; if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { vehicleid = GetPlayerVehicleID(playerid); } new id = GetVehicleID(vehicleid); new color = strval(inputtext); if(color < 0 || color > 255) return ShowPlayerDialog(playerid, DIALOG_COLOR1, DIALOG_STYLE_INPUT,"Color","Please type in colour id 1 below. [0-255]","Submit","Cancel"); VehicleColor[id][0] = color; ShowPlayerDialog(playerid, DIALOG_COLOR2, DIALOG_STYLE_INPUT,"Color","Please type in colour id 2 below.","Submit","Cancel"); } case DIALOG_COLOR2: { new vehicleid; if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { vehicleid = GetPlayerVehicleID(playerid); } new id = GetVehicleID(vehicleid); new color2 = strval(inputtext); if(color2 < 0 || color2 > 255) return ShowPlayerDialog(playerid, DIALOG_COLOR2 , DIALOG_STYLE_INPUT, "Color","Please type in colour id 2 below. [0-255]","Submit","Cancel"); VehicleColor[id][1] = color2; ChangeVehicleColor(vehicleid, VehicleColor[id][0], VehicleColor[id][1]); GivePlayerMoney(playerid, -100); SaveVehicle(id); }