pawn Код:
forward BoughtCarInfo(playerid);
public BoughtCarInfo(playerid)
{
new vstring[128], playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername,sizeof(playername));
new INI:vfile = INI_Open(VehPath(playerid));
new Float:X, Float:Y, Float:Z, Float:A;
new vehicleid = GetPlayerVehicleID(vehicleid);
new vcolor1,vcolor2;
ChangeVehicleColor(vehicleid, vcolor1, vcolor2);
GetVehiclePos(vehicleid,X,Y,Z);
GetVehicleZAngle(vehicleid, A);
INI_SetTag(vfile,"Vehicle Info");
INI_WriteInt(vfile, "Owner",VehicleInfo[playerid][vOwner] = 1);
INI_WriteInt(vfile, "Model", vehicleid);
INI_WriteInt(vfile, "Plate",VehicleInfo[playerid][vPlate] = 0);
INI_WriteFloat(vfile,"LocX",X);
INI_WriteFloat(vfile,"LocY",Y);
INI_WriteFloat(vfile,"LocZ",Z);
INI_WriteFloat(vfile,"LocA",A);
INI_WriteInt(vfile, "Color1",vColor1);
INI_WriteInt(vfile, "Color1",vColor2);
INI_WriteInt(vfile, "Mod1",VehicleInfo[playerid][vMod1] = 0);
INI_WriteInt(vfile, "Mod2",VehicleInfo[playerid][vMod2] = 0);
INI_WriteInt(vfile, "Mod3",VehicleInfo[playerid][vMod3] = 0);
INI_WriteInt(vfile, "Mod4",VehicleInfo[playerid][vMod4] = 0);
INI_WriteInt(vfile, "Mod5",VehicleInfo[playerid][vMod5] = 0);
INI_WriteInt(vfile, "Mod6",VehicleInfo[playerid][vMod6] = 0);
INI_WriteInt(vfile, "Mod7",VehicleInfo[playerid][vMod7] = 0);
INI_WriteInt(vfile, "Mod8",VehicleInfo[playerid][vMod8] = 0);
INI_WriteInt(vfile, "Mod9",VehicleInfo[playerid][vMod9] = 0);
INI_WriteInt(vfile, "Mod10",VehicleInfo[playerid][vMod10] = 0);
INI_WriteInt(vfile, "Mod11",VehicleInfo[playerid][vMod11] = 0);
INI_WriteInt(vfile, "Mod12",VehicleInfo[playerid][vMod12] = 0);
format(vstring, sizeof(vstring), "%s, You've Bought A %s Remember To /Park your vehicle",playername, VehNames[GetVehicleModel(vehicleid)-400]);
SendClientMessage(playerid, ORANGE, vstring);
INI_Close(vfile);
return 1;
}
Im trying to get this code to get the Vehicle ID ... When purchased it .. But its working but only Putting this Into the Car Userfile