Advertisement
Johurt

[SCR] Neleidziami ginklai.

Oct 15th, 2012
358
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.69 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. public OnGameModeInit()
  4. {
  5.     SetTimer("CheckGun", 1000, true);
  6.     return 1;
  7. }
  8.  
  9. forward CheckGun();
  10. public CheckGun()
  11. {
  12.     for(new p = 0; p < GetMaxPlayers(); p++)
  13.     {
  14.         new gunid = GetPlayerWeapon(p);
  15.         if(gunid == 35 || gunid == 36)
  16.         {
  17.             new str[125];
  18.             ResetPlayerWeapons(p);
  19.             SendClientMessage(p, -1, "{FFDEAD}KICK: {FFFFFF}Gavai kicka uz neleistinu ginklu naudojima");
  20.             format(str, sizeof(str), "%s ismestas uz neleistinu ginklu naudojima.", GetPlayerNameEx(p));
  21.             SendClientMessageToAll(0xFFFFFFFF, str);
  22.             Kick(p);
  23.         }
  24.     }
  25.     return 1;
  26. }
  27.  
  28. stock GetPlayerNameEx(playerid)
  29. {
  30.     new pName[MAX_PLAYER_NAME];
  31.     GetPlayerName(playerid, pName, 21);
  32.     return pName;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement