MistarA

Untitled

Apr 4th, 2020
779
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.68 KB | None | 0 0
  1. case DIALOG_MOVEBIZ: {
  2. if(!response) return true;
  3. new Float: Pos[3], id = GetPVarInt(playerid, "MoveID");
  4. GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
  5. gQuery[0] = EOS;
  6. switch(listitem) {
  7. case 0: {
  8. if(GetPlayerInterior(playerid) == 0) return SCM(playerid, COLOR_LGREEN, "Eroare: Nu esti intr-un interior!");
  9. BizzInfo[id][bExitX] = Pos[0];
  10. BizzInfo[id][bExitY] = Pos[1];
  11. BizzInfo[id][bExitZ] = Pos[2];
  12. BizzInfo[id][bInterior] = GetPlayerInterior(playerid);
  13. SCM(playerid, COLOR_LGREEN, "Interiorul afacerii a fost modificat!");
  14. UpdateLabel(2, id);
  15. mysql_format(SQL, gQuery, sizeof(gQuery), "UPDATE `bizz` SET `Exitx`='%f', `Exity`='%f', `Exitz`='%f', `Interior`='%d' WHERE `ID`='%d'", Pos[0], Pos[1], Pos[2], GetPlayerInterior(playerid), BizzInfo[id][bID]);
  16. mysql_tquery(SQL, gQuery, "", "");
  17. }
  18. case 1: {
  19. if(GetPlayerInterior(playerid) != 0) return SCM(playerid, COLOR_LGREEN, "Eroare: Esti intr-un interior!");
  20. DestroyDynamicPickup(BizzInfo[id][bPickup]);
  21. BizzInfo[id][bEntranceX] = Pos[0];
  22. BizzInfo[id][bEntranceY] = Pos[1];
  23. BizzInfo[id][bEntranceZ] = Pos[2];
  24. BizzInfo[id][bPickup] = CreateDynamicPickup(BizzInfo[id][bType] != 19 ? 1239 : 1318, 1, BizzInfo[id][bEntranceX], BizzInfo[id][bEntranceY], BizzInfo[id][bEntranceZ], -1, -1, -1, 100.0);
  25. SCM(playerid, COLOR_LGREEN, "Exteriorul afacerii a fost modificat!");
  26. UpdateLabel(2, id);
  27. mysql_format(SQL, gQuery, sizeof(gQuery), "UPDATE `bizz` SET `Entrancex`='%f', `Entrancey`='%f', `Entrancez`='%f' WHERE `ID`='%d'", Pos[0], Pos[1], Pos[2], BizzInfo[id][bID]);
  28. mysql_tquery(SQL, gQuery, "", "");
  29. }
  30. }
  31. }
Add Comment
Please, Sign In to add comment