Guest User

Untitled

a guest
May 23rd, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.92 KB | None | 0 0
  1. if(dialogid == 555)
  2. {
  3. if(!response) return SendClientMessage(playerid, 0xFFFFFFFF, "Odustao si.");
  4. if(response)
  5. {
  6. if (PlayerInfo[playerid][pAdmin] < 3)
  7. {
  8. SendClientMessage(playerid, COLOR_GRAD1, " niste ovlasteni da koristite tu komandu!");
  9. return 1;
  10. }
  11. tmp = strtok(cmdtext, idx);
  12. if(!strlen(tmp))
  13. {
  14. SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: /veh [id vozila] [boja1] [boja2]");
  15. return 1;
  16. }
  17. new car;
  18. car = strval(tmp);
  19. if(car < 400 || car > 611) { SendClientMessage(playerid, COLOR_GREY, " ID vozila ne moze biti ispod 400 ili preko 611 !"); return 1; }
  20. tmp = strtok(cmdtext, idx);
  21. if(!strlen(tmp))
  22. {
  23. SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: /veh [id vozila] [boja1] [boja2]");
  24. return 1;
  25. }
  26. new color1;
  27. color1 = strval(tmp);
  28. if(color1 < 0 || color1 > 126) { SendClientMessage(playerid, COLOR_GREY, " ID Boje ne moze biti ispod 0 ili preko 126 !"); return 1; }
  29. tmp = strtok(cmdtext, idx);
  30. if(!strlen(tmp))
  31. {
  32. SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: /veh [id vozila] [boja1] [boja2]");
  33. return 1;
  34. }
  35. new color2;
  36. color2 = strval(tmp);
  37. if(color2 < 0 || color2 > 126) { SendClientMessage(playerid, COLOR_GREY, " ID Boje ne moze biti ispod 0 ili preko 126 !"); return 1; }
  38. new Float:X,Float:Y,Float:Z;
  39. GetPlayerPos(playerid, X,Y,Z);
  40. new carid = CreateVehicle(car, X,Y,Z, 0.0, color1, color2, 60000);
  41. CreatedCars[CreatedCar] = carid;
  42. PutPlayerInVehicle(playerid, carid, 0);
  43. CreatedCar ++;
  44. format(string, sizeof(string), " Vozilo %d je stvoreno.", carid);
  45. SendClientMessage(playerid, COLOR_GREY, string);
  46. }
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54. if(strcmp(cmd, "/createveh", true) == 0)
  55. {
  56. ShowPlayerDialog(playerid,5555,DIALOG_STYLE_INPUT,"CreateVeh","Upisite id vozila","Kreiraj","Izlaz");
  57. return 1;
  58. }
Add Comment
Please, Sign In to add comment