Guest User

Untitled

a guest
Apr 22nd, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.34 KB | None | 0 0
  1. //OnGameModeInit();
  2. for(new v; v<MAX_VEHICLES; v++)
  3. {
  4.     if(dini_Exists(VFile(i))
  5.     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");
  6. }
  7.  
  8. stock AddVehicle(vehicleid, modelid[], Float:x, Float:y, Float:z, Float:angle, color1[], color2[], respawn[])
  9. {
  10.     new file[256];
  11.     format(file, sizeof(file), "Users/vehicle/%d.txt", vehicleid);
  12.     if(!dini_Exists(file))
  13.     {
  14.         dini_Create(file);
  15.         dini_IntSet(file, "Model", strval(modelid));
  16.         dini_FloatSet(file, "X", x);
  17.         dini_FloatSet(file, "Y", y);
  18.         dini_FloatSet(file, "Z", z);
  19.         dini_FloatSet(file, "Angle", angle);
  20.         dini_IntSet(file, "color1", strval(color1));
  21.         dini_IntSet(file, "color2", strval(color2));
  22.         dini_IntSet(file, "respawn", strval(respawn));
  23.         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");
  24.     }
  25.     else if(dini_Exists(file))
  26.         CreateVehicle(strval(modelid), x, y, z, angle, strval(color1), strval(color2), strval(respawn));
  27. }
  28. stock VFile(vehicleid)
  29. {
  30.     new vfile[256];
  31.     format(vfile, sizeof(vfile), "Users/vehicle/%d.txt", vehicleid);
  32.     return vfile;
  33. }
Add Comment
Please, Sign In to add comment