Advertisement
Guest User

Untitled

a guest
Dec 15th, 2019
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.84 KB | None | 0 0
  1. forward SQL_CallVehicleCreate(playerid, model, Float:x, Float:y, Float:z, Float:a, color1, color2);
  2. public SQL_CallVehicleCreate(playerid, model, Float:x, Float:y, Float:z, Float:a, color1, color2)
  3. {
  4. new string[128];
  5.  
  6. for(new i; i < MAX_VEHICLES; i++)
  7. {
  8.  
  9. if(vInfo[i][vExist]) continue;
  10.  
  11. vInfo[i][vSQL] = cache_insert_id();
  12.  
  13. vInfo[i][vModel] = model;
  14. vInfo[i][vColor1] = color1;
  15. vInfo[i][vColor2] = color2;
  16. vInfo[i][vPosX] = x;
  17. vInfo[i][vPosY] = y;
  18. vInfo[i][vPosZ] = z;
  19. vInfo[i][vPosA] = a;
  20.  
  21. SetPlayerPos(playerid, x+2, y+2, z);
  22.  
  23. vInfo[i][vExist] = true;
  24.  
  25. //vInfo[i][vID] = CreateVehicle(vInfo[i][vModel], vInfo[i][vPosX], vInfo[i][vPosY], vInfo[i][vPosZ], vInfo[i][vPosA], vInfo[i][vColor1], vInfo[i][vColor2], -1, 0);
  26. vInfo[i][vID] = AddStaticVehicle(vInfo[i][vModel], vInfo[i][vPosX], vInfo[i][vPosY], vInfo[i][vPosZ], vInfo[i][vPosA], vInfo[i][vColor1], vInfo[i][vColor2]);
  27.  
  28. format(string, sizeof(string), "{ff709d}[ADMIN] {70bcff}Création du véhicule SQLid : {FFFFFF}%d ", cache_insert_id());
  29. SendClientMessage(playerid, -1, string);
  30.  
  31.  
  32. format(vInfo[i][vPlaque], 32, "AUCUNE");
  33. new Text3D:vehicle3dtext[MAX_VEHICLES];
  34.  
  35. vehicle3dtext[vInfo[i][vID]] = Create3DTextLabel("test", -1, 0.0, 0.0, 0.0, 50.0, 0, 1);
  36. Attach3DTextLabelToVehicle(vehicle3dtext[vInfo[i][vID]], vInfo[i][vID], -0.7, -1.9, -0.3);
  37.  
  38. new string5[256];
  39. format(string5, sizeof string5, "%s", vInfo[i][vPlaque]);
  40. Update3DTextLabelText(vehicle3dtext[vInfo[i][vID]], -1, string5);
  41. Attach3DTextLabelToVehicle(vehicle3dtext[vInfo[i][vID]], vInfo[i][vID], -0.7, -1.9, -0.3);
  42.  
  43. new stringplaque[7];
  44. format(stringplaque, sizeof(stringplaque), "%s", vInfo[i][vPlaque]);
  45. SetVehicleNumberPlate(i, stringplaque);
  46. SetVehicleToRespawn(i);
  47.  
  48. break;
  49. }
  50.  
  51. return 1;
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement