Advertisement
Guest User

Untitled

a guest
Jan 21st, 2012
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.39 KB | None | 0 0
  1. if(strcmp(cmd, "/veh", true) == 0)
  2. {
  3. if(IsPlayerConnected(playerid))
  4. {
  5. if (PlayerInfo[playerid][pAdmin] < 6)
  6. {
  7. SendClientMessage(playerid, COLOR_GRAD1, " Nisi u mogucnosti koristiti ovu komandu!");
  8. return 1;
  9. }
  10. tmp = strtok(cmdtext, idx);
  11. if(!strlen(tmp))
  12. {
  13. SendClientMessage(playerid, COLOR_GRAD2, "KORISTI: /veh [carid] [color1] [color2]");
  14. return 1;
  15. }
  16. new car;
  17. car = strval(tmp);
  18. if(car < 400 || car > 611) { SendClientMessage(playerid, COLOR_GREY, " Vozila nemogu ici ispod 400 ili iznad 611 !"); return 1; }
  19. tmp = strtok(cmdtext, idx);
  20. if(!strlen(tmp))
  21. {
  22. SendClientMessage(playerid, COLOR_GRAD2, "KORISTI: /veh [carid] [color1] [color2]");
  23. return 1;
  24. }
  25. new color1;
  26. color1 = strval(tmp);
  27. if(color1 < -1 || color1 > 126) { SendClientMessage(playerid, COLOR_GREY, " Boja nemoze biti ispod 0 ili iznad 126 !"); return 1; }
  28. tmp = strtok(cmdtext, idx);
  29. if(!strlen(tmp))
  30. {
  31. SendClientMessage(playerid, COLOR_GRAD2, "KORISTI: /veh [carid] [color1] [color2]");
  32. return 1;
  33. }
  34. if(car == 520) Hydras ++;
  35. if(car == 425) Hunters ++;
  36. if(car == 430) Predators ++;
  37. if(car == 432) Rhinos ++;
  38. new color2;
  39. color2 = strval(tmp);
  40. if(color2 < -1 || color2 > 126) { SendClientMessage(playerid, COLOR_GREY, " Boja nemoze biti ispod 0 ili iznad 126 !"); return 1; }
  41. new Float:X,Float:Y,Float:Z;
  42. GetPlayerPos(playerid, X,Y,Z);
  43. new carid = CreateVehicle(car, X,Y+5,Z+1, 0.0, color1, color2, 60000);
  44. LinkVehicleToInterior(carid, GetPlayerInterior(playerid));
  45. SetVehicleVirtualWorld(carid, GetPlayerVirtualWorld(playerid));
  46. format(string, sizeof(string), "** Vozilo %d spawnano.", carid);
  47. SendClientMessage(playerid, COLOR_GREY, string);
  48. new housename[24]; GetVehicleName(carid, housename, sizeof(housename));
  49. new area[24]; GetPlayer2DZone(playerid, area, sizeof(area));
  50. format(string,sizeof(string), "[ADMIN]: %s je spawnao %s (%d) [%d] na svojoj poziciji (%s).",sendername,housename,car,carid,area);
  51. ABroadCast(COLOR_LIGHTRED, string, 5);
  52. new y, m, d;
  53. new h,mi,s;
  54. getdate(y,m,d);
  55. gettime(h,mi,s);
  56. format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s Has Spawned a %s (%d) [%d] (Color 1: %d | Color 2: %d) At His Position.",d,m,y,h,mi,s,sendername,housename,car,carid,color1,color2);
  57. AdminLog(string);
  58. }
  59. return 1;
  60. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement