Not saving
#1

Why is this not saving?
Код:
public OnPlayerSpray(playerid)
{
    if(pick == 1)
	{
	    //new color = colort;
    	ChangeVehicleColor(vehid, colort, 0);
    	VehicleColor[playerid][0] = colort;
	}
	else
	{
	    new pID;
	    //new color2=color;
	    pID = Requested[playerid];
		ChangeVehicleColor(vehid, 0, colort);
		VehicleColor[playerid][1] = colort;
		KillTimer(SprayT);
		//Spray[pID] = 0;
		//Spray[playerid] = 0;
		Service[pID][0] = 0;
		Service[playerid][0] = 0;
		SaveVehicle(playerid);
		SendClientMessage(playerid, COLOR_GREEN, "Ai vopsit masina cu succes!");
	}
	return 1;
}
Reply
#2

What you mean by saving?
What it should save?
Reply
#3

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

Код:
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);
		}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)