Guest User

pomoc

a guest
Dec 23rd, 2016
288
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.31 KB | None | 0 0
  1. //
  2.  
  3. new Text3D:avozila[MAX_PLAYERS];
  4. new AdminVozilo[MAX_PLAYERS];
  5. new vozilolist = mS_INVALID_LISTID;
  6. new avehvozilo;
  7.  
  8. //
  9. Pod OnPlayerConnect
  10.  
  11. AdminVozilo[playerid] = -1;
  12.  
  13. //
  14.  
  15. Pod OnPlayerDisconnect
  16.  
  17. if(AdminVozilo[playerid] != -1)
  18. {
  19. g_DestroyVehicle_g(AdminVozilo[playerid]);
  20. AdminVozilo[playerid] = -1;
  21. }
  22.  
  23. //
  24.  
  25. Pod OnPlayerSpawn
  26.  
  27. if(AdminVozilo[playerid] != -1)
  28. {
  29. g_DestroyVehicle_g(AdminVozilo[playerid]);
  30. AdminVozilo[playerid] = -1;
  31. }
  32.  
  33. //
  34.  
  35. pod public OnPlayerModelSelection(playerid, response, listid, modelid)
  36. {
  37. if(listid == vozilolist)
  38. {
  39. if(response)
  40. {
  41. new Float:POs[4], string[90];
  42. GetPlayerPos(playerid, POs[0], POs[1], POs[2]);
  43. Info(playerid,"Spawnali ste A/GM Vozilo.");
  44. avehvozilo = g_CreateVehicle_g(modelid, POs[0], POs[1], POs[2], POs[3], 0, 0,999);
  45. g_PutPlayerInVehicle_g(playerid, avehvozilo, 0);
  46. AdminVozilo[playerid] = avehvozilo;
  47. format(string,sizeof(string),""SIVA"[ STAFF VOZILO - %s ]", GetName(playerid));
  48. Attach3DTextLabelToVehicle(avozila[playerid], model, 0.0, 0.0, 0.0);
  49. Update3DTextLabelText(avozila[playerid], avehvozilo, string);
  50. new engine, lights, alarm, doors, bonnet, boot, objective;
  51. GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective);
  52. SetVehicleParamsEx(GetPlayerVehicleID(playerid), 1, 1, alarm, doors, bonnet, boot, objective);
  53. g_SetVehicleHealth_g(GetPlayerVehicleID(playerid), 999);
  54. }
  55. else Info(playerid,"Odustali ste od spawnanja Admin/GameMaster Vozila");
  56. return 1;
  57. }
  58. return 1;
  59. }
  60.  
  61. //
  62.  
  63. komanda YCMD:aveh(playerid, params[],help)
  64. {
  65. #pragma unused help
  66. if(UlogovanProvera[playerid] == 0) return Error(playerid,"Moras se ulogovati da bi koristio ovu komandu!");
  67. GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
  68. if(PlayerInfo[playerid][pGM] >= 1 || PlayerInfo[playerid][pAdmin] >= 1)
  69. {
  70. if(AdminVozilo[playerid] != -1)
  71. {
  72. DestroyVehicle(AdminVozilo[playerid]);
  73. AdminVozilo[playerid] = -1;
  74. return Info(playerid,"Unistili ste Admin & GameMaster Vozilo.");
  75. }
  76. else if(AdminVozilo[playerid] == -1)
  77. {
  78. ShowModelSelectionMenu(playerid, vozilolist, "Admin Vozila");
  79. }
  80. }
  81. else return Error(playerid,"Nisi ovlascen!");
  82. return 1;
  83. }
  84.  
  85. //
Advertisement
Add Comment
Please, Sign In to add comment