new vehicleid = CreateVehicle(VehicleInfo[Model], VehicleInfo[posX], VehicleInfo[posY], VehicleInfo[posZ], VehicleInfo[posA], VehicleInfo[Color1], VehicleInfo[Color2], 600); PutPlayerInVehicle(playerid, vehicleid, 0); |
enum VehicleData { VehID, Model, Float: posX, Float: posY, Float: posZ, Float: posA, Color1, Color2, Float:World } new VehicleInfo[VehicleData]; |
new vehicleid = GetPlayerVehicleID(playerid); VehicleInfo[Model] = GetVehicleModel(vehicleid); GetVehiclePos(vehicleid, VehicleInfo[posX], VehicleInfo[posY], VehicleInfo[posZ]); GetVehicleZAngle(vehicleid, VehicleInfo[posA]); GetVehicleColor(vehicleid, VehicleInfo[Color1], VehicleInfo[Color2]); VehicleInfo[World] = GetVehicleVirtualWorld(vehicleid); dini_IntSet(string, "VehModel", VehicleInfo[Model]); dini_FloatSet(string, "Position(X)", PlayerInfo[playerid][posX]); dini_FloatSet(string, "Position(Y)", PlayerInfo[playerid][posY]); dini_FloatSet(string, "Position(Z)", PlayerInfo[playerid][posZ]); dini_FloatSet(string, "FacingAngle", PlayerInfo[playerid][posA]); dini_FloatSet(string, "VehPosition(X)", VehicleInfo[posX]); dini_FloatSet(string, "VehPosition(Y)", VehicleInfo[posY]); dini_FloatSet(string, "VehPosition(Z)", VehicleInfo[posZ]); dini_FloatSet(string, "VehPosition(A)", VehicleInfo[posA]); dini_IntSet(string, "VehColor1", VehicleInfo[Color1]); dini_IntSet(string, "VehColor2", VehicleInfo[Color2]); dini_FloatSet(string, "VehWorld", VehicleInfo[World]); |
VehicleInfo[Model] = dini_Int(string2, "VehModel"); PlayerInfo[playerid][posX] = dini_Float(string2, "Position(X)"); PlayerInfo[playerid][posY] = dini_Float(string2, "Position(Y)"); PlayerInfo[playerid][posZ] = dini_Float(string2, "Position(Z)"); PlayerInfo[playerid][posA] = dini_Float(string2, "FacingAngle"); VehicleInfo[posX] = dini_Float(string2, "VehPosition(X)"); VehicleInfo[posY] = dini_Float(string2, "VehPosition(Y)"); VehicleInfo[posZ] = dini_Float(string2, "VehPosition(Z)"); VehicleInfo[posA] = dini_Float(string2, "VehPosition(A)"); VehicleInfo[Color1] = dini_Int(string2, "VehColor1"); VehicleInfo[Color2] = dini_Int(string2, "VehColor2"); VehicleInfo[World] = dini_Float(string2, "VehWorld"); |