Advertisement
dann1s

AC

Dec 25th, 2019
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 2.00 KB | None | 0 0
  1. //nova varijabla
  2. new bool:ModShopUsao[MAX_PLAYERS];
  3.  
  4. //onplayerconnect
  5. ModShopUsao[playerid] = false;
  6.  
  7. public OnEnterExitModShop(playerid, enterexit, interiorid)
  8. {
  9.     ModShopUsao[playerid] = true;
  10.     return 1;
  11. }
  12.  
  13. //izmjeni
  14. forward AC_SetPlayerPos(playerid, Float:x, Float:y, Float:z);
  15. public AC_SetPlayerPos(playerid, Float:x, Float:y, Float:z)
  16. {
  17.     Portan[playerid] = 3;
  18.     GetPlayerPos(playerid, PortK[0][playerid], PortK[1][playerid], PortK[2][playerid]);
  19.     SetPlayerPos(playerid, x, y, z);
  20.     return 1;
  21. }
  22.  
  23.  
  24. // timer od 1 sec
  25. if(Igrac[i][pAdminNivo] == 0 && Igrac[i][pGameXpert] == 0 && !ModShopUsao[i] && UWSobi[i] == 999 && Portan[i] == 0 && GetPlayerSurfingVehicleID( i ) == INVALID_VEHICLE_ID)
  26. {
  27.     if(!IsPlayerInRangeOfPoint( i, 200.0, PortK[0][i], PortK[1][i], PortK[2][i]) && GetPlayerState(i) != PLAYER_STATE_PASSENGER && GetPlayerState(i) != PLAYER_STATE_SPECTATING)
  28.     {
  29.         format(carcit, 128,"{F81414}YUB AC/A |{F3FF02} Registrovano moguce portanje igraca %s (%d).",GetPlayerNameEx(i), i);
  30.         MessageToAdmins(COLOR_GREY,carcit,1,9999);
  31.         PortAC[i]++;
  32.         if(PortAC[i] == 2)
  33.         {
  34.             SendClientMessage(i, COLOR_GREY, "{F3FF02}[YUB]: {F81414}Izbaceni ste zbog cheatova za portanje!");
  35.             SetTimerEx("KickPublic", 100, 0, "d", i);
  36.         }
  37.         PortLog(i);
  38.     }
  39.     else if(!IsPlayerInRangeOfPoint( i, 500.0, PortK[0][i], PortK[1][i], PortK[2][i]) && GetPlayerState(i) != PLAYER_STATE_PASSENGER && GetPlayerState(i) != PLAYER_STATE_SPECTATING)
  40.     {
  41.         format(carcit, 128,"{F81414}YUB AC/A |{F3FF02} Igrac %s (%d) je izbacen zbog cheatova za portanje.",GetPlayerNameEx(i), i);
  42.         MessageToAdmins(COLOR_GREY,carcit,1,9999);
  43.         SendClientMessage(i, COLOR_GREY, "{F3FF02}[YUB]: {F81414}Izbaceni ste zbog cheatova za portanje!");
  44.         SetTimerEx("KickPublic", 100, 0, "d", i);
  45.         PortLog(i);
  46.     }
  47. }
  48. GetPlayerPos(i, PortK[0][i], PortK[1][i], PortK[2][i]);
  49. ModShopUsao[i] = false;
  50. if(Portan[i] > 0)
  51. {
  52.     Portan[i]--;
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement