Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //OnGameModeInit();
- for(new v; v<MAX_VEHICLES; v++)
- {
- if(dini_Exists(VFile(i))
- CreateVehicle(i, dini_Float(VFile(i), "X"), dini_Float(VFile(i), "X"), dini_Float(VFile(i), "X"),dini_Int(VFile(i), "Angle"), dini_Int(VFile(i), "color1"), dini_Int(VFile(i), "color2"), dini_Int(VFile(i), "respawn");
- }
- stock AddVehicle(vehicleid, modelid[], Float:x, Float:y, Float:z, Float:angle, color1[], color2[], respawn[])
- {
- new file[256];
- format(file, sizeof(file), "Users/vehicle/%d.txt", vehicleid);
- if(!dini_Exists(file))
- {
- dini_Create(file);
- dini_IntSet(file, "Model", strval(modelid));
- dini_FloatSet(file, "X", x);
- dini_FloatSet(file, "Y", y);
- dini_FloatSet(file, "Z", z);
- dini_FloatSet(file, "Angle", angle);
- dini_IntSet(file, "color1", strval(color1));
- dini_IntSet(file, "color2", strval(color2));
- dini_IntSet(file, "respawn", strval(respawn));
- CreateVehicle(i, dini_Float(VFile(i), "X"), dini_Float(VFile(i), "X"), dini_Float(VFile(i), "X"),dini_Int(VFile(i), "Angle"), dini_Int(VFile(i), "color1"), dini_Int(VFile(i), "color2"), dini_Int(VFile(i), "respawn");
- }
- else if(dini_Exists(file))
- CreateVehicle(strval(modelid), x, y, z, angle, strval(color1), strval(color2), strval(respawn));
- }
- stock VFile(vehicleid)
- {
- new vfile[256];
- format(vfile, sizeof(vfile), "Users/vehicle/%d.txt", vehicleid);
- return vfile;
- }
Add Comment
Please, Sign In to add comment