N1E7R4V

Untitled

Oct 27th, 2015
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.08 KB | None | 0 0
  1. function OnPlayerWeaponMode(playerid, weaponmode)
  2. local p_x, p_y, p_z = GetPlayerPos(playerid);
  3. if GetDistance3D(p_x, p_y, p_z, 10.852104187012, 59.856369018555, -1340.2938232422) > 900 then
  4. if weaponmode ~= WEAPON_CBOW then
  5. SetPlayerWeaponMode(playerid, WEAPON_NONE);
  6. SendPlayerMessage(playerid,230,230,230,"Нельзя доставать оружие вне арены!");
  7. Player[playerid].warn = Player[playerid].warn + 1;
  8. end
  9. if Player[playerid].warn >= 5 then
  10. SendPlayerMessage(playerid,255,0,0,"ДМ ВНЕ АРЕНЫ ЗАПРЕЩЕН");
  11. Kick(playerid);
  12. end
  13. end
  14. end
  15.  
  16. function OnPlayerHit(playerid, killerid)
  17. local message = string.format("%s %s %s",GetPlayerName(killerid),"->", GetPlayerName(playerid));
  18. LogString("HIT_LOG",message);
  19.  
  20. local p_x, p_y, p_z = GetPlayerPos(killerid);
  21. if GetDistance3D(p_x, p_y, p_z, 10.852104187012, 59.856369018555, -1340.2938232422) > 900 then
  22. Player[killerid].warn = Player[killerid].warn + 1;
  23. end
  24. if Player[killerid].warn >= 2 then
  25. SendPlayerMessage(killerid,255,0,0,"ДМ ВНЕ АРЕНЫ ЗАПРЕЩЕН");
  26. Kick(killerid);
  27. end
  28. end
Advertisement
Add Comment
Please, Sign In to add comment