Advertisement
CorleoneZ

Untitled

Sep 21st, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.03 KB | None | 0 0
  1. if(strcmp(cmd, "/recon", true) == 0)
  2. {
  3. if (PlayerInfo[playerid][pAdminLevel] < 1)
  4. {
  5. SCM(playerid, COLOR_LIGHTRED, "ERROR: Ne mozete koristiti ovu komandu - nemate administrator level.");
  6. return 1;
  7. }
  8. if(Specing[playerid] > 0)
  9. {
  10. SCM(playerid, COLOR_LIGHTRED, "ERROR: Ne mozete nekoga reconati jer ste vec na reconu - ugasite ga pomocu space tipke.");
  11. return 1;
  12. }
  13. tmp = strtok(cmdtext,idx);
  14. if (!strlen(tmp))
  15. {
  16. SCM(playerid, COLOR_DGOLD, "KORISTENJE: /recon [ID/Dio Imena]");
  17. return 1;
  18. }
  19. new playa = ReturnUser(tmp);
  20. if (playa == INVALID_PLAYER_ID)
  21. {
  22. SCM(playerid, COLOR_LIGHTRED, "ERROR: Odabrani igrac nije ulogiran ili je offline.");
  23. return 1;
  24. }
  25. if(PlayerTied[playerid] > 0) { SCM(playerid, COLOR_LIGHTRED, "ERROR: Ne mozete koristiti ovu komandu jer ste trenutno zavezani."); }
  26. if(PlayerCuffed[playerid] > 0) { SCM(playerid, COLOR_LIGHTRED, "ERROR: Ne mozete koristiti ovu komandu jer trenutno imate lisice na sebi."); }
  27. playa = ReturnUser(tmp);
  28. new Float:health, Float:armour, Float:vehhp, vehicle, stringz[128];
  29. //ZA ADMINA
  30. GetPlayerPos(playerid, ReconLocation[playerid][0], ReconLocation[playerid][1], ReconLocation[playerid][2]);
  31. GetPlayerHealth(playerid, reconhealth[playerid][0]);
  32. GetPlayerArmour(playerid, reconhealth[playerid][1]);
  33. reconint[playerid][0] = GetPlayerInterior(playerid);
  34. reconint[playerid][1] = GetPlayerVirtualWorld(playerid);
  35. SaveGuns(playerid);
  36. if(IsPlayerInAnyVehicle(playerid))
  37. {
  38. reconveh[playerid][0] = GetPlayerVehicleID(playerid);
  39. }
  40. //KRAJ
  41. TogglePlayerSpectating(playerid, 1);
  42. if(!IsPlayerInAnyVehicle(playa)) { PlayerSpectatePlayer(playerid, playa); }
  43. else if(IsPlayerInAnyVehicle(playa)) { PlayerSpectateVehicle(playerid, GetPlayerVehicleID(playa)); }
  44. SetPlayerInterior(playerid, GetPlayerInterior(playa));
  45. SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(playa));
  46. Specing[playerid] = 1;
  47. Speced[playa] = 1;
  48. spectatorid[playerid] = playa;
  49. vehicle = GetPlayerVehicleID(playa);
  50. recontimer[playerid] = SetTimerEx("reconnn", 1000, true, "%i", playerid);
  51. TextDrawShowForPlayer(playerid, ReconImePrezime[playa]);
  52. TextDrawShowForPlayer(playerid, ReconZdravljePancir[playa]);
  53. TextDrawShowForPlayer(playerid, ReconInfo[playa]);
  54. TextDrawShowForPlayer(playerid, ReconArea[playa]);
  55. TextDrawShowForPlayer(playerid, ReconPrekid[playa]);
  56. GetPlayerHealth(playa, health);
  57. GetPlayerArmour(playa, armour);
  58. GetVehicleHealth(vehicle, vehhp);
  59. format(string, sizeof(string), "AdmWarn: Administrator %s sada recona igraca %s.", Ime(playerid), Ime(playa));
  60. SendAdminosMessage(COLOR_ADMWARN, string);
  61. new tazeeer[4];
  62. if(PlayerCuffed[playa] >= 1) { tazeeer = "DA"; }
  63. else if(PlayerCuffed[playa] == 0) { tazeeer = "NE"; }
  64. new tieeed[4];
  65. if(PlayerTied[playa] == 1) { tieeed = "DA"; }
  66. else if(PlayerTied[playa] == 0) { tieeed = "NE"; }
  67. new area;
  68. if(PlayerInfo[playa][pArea] == 1) { area = PlayerInfo[playa][pAreaTime]; }
  69. else if(PlayerInfo[playa][pJail] == 1) { area = PlayerInfo[playa][pJailTime]; }
  70. new areasec;
  71. if(PlayerInfo[playa][pArea] == 1) { areasec = PlayerInfo[playa][pAreaSec]; }
  72. else if(PlayerInfo[playa][pJail] == 1) { areasec = PlayerInfo[playa][pJailSec]; }
  73. format(stringz, 128, "~y~]]]]] %s ]]]]]", Ime(playa));
  74. TextDrawSetString(ReconImePrezime[playa], stringz);
  75. format(stringz, 128, "~p~ZDRAVLJE IGRACA: ~w~%.0f/100 / ~p~ZDRAVLJE VOZILA: ~w~%.0f/1000", health, vehhp);
  76. TextDrawSetString(ReconZdravljePancir[playa], stringz);
  77. format(stringz, 128, "~p~LEVEL: ~w~%02d / ~p~NOVAC: ~w~%d$ / ~p~BANKA: ~w~%d$", PlayerInfo[playa][pScore], GetPlayerMoney(playa), PlayerInfo[playa][pBank]);
  78. TextDrawSetString(ReconInfo[playa], stringz);
  79. format(stringz, 128, "~p~AREA/JAIL: ~w~%02d:%02d / ~p~TAZZ/TIE: ~w~%s-%s", area,areasec, tazeeer, tieeed);
  80. TextDrawSetString(ReconArea[playa], stringz);
  81. return 1;
  82. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement