SHARE
TWEET

FreddoX

a guest May 2nd, 2010 229 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2.  *  Simple functions by Lorenc
  3.  *  Created while practising loops
  4.  *  Common sense applied by FreddoX (edited by FreddoX).
  5. */
  6.  
  7. #include <a_samp>
  8. #include <foreach>
  9.  
  10. /*
  11.  
  12.         Psuedo-code (trick the pawn sidebar)
  13.  
  14.         native GiveAllPlayersWeapon(Weaponid,Ammo);
  15.         native ResetAllPlayersCash();
  16.         native KickAllPlayers();
  17.         native BanAllPlayers();
  18.         native SetAllPlayersVirtualWorld(World);
  19.         native SetAllPlayersSkin(Skinid);
  20.         native SetAllPlayersInterior(Interior);
  21.         SetAllPlayersScore(Score);
  22.        
  23. */
  24.  
  25. stock SetAllPlayersScore(Score)
  26. {
  27.         foreach(Player, i)
  28.         {
  29.                 SetPlayerScore( i, Score );
  30.         }
  31.        
  32.         return 1;
  33. }
  34.  
  35. stock GiveAllPlayersWeapon(Weaponid,Ammo)
  36. {
  37.         foreach(Player, i)
  38.         {
  39.                 GivePlayerWeapon( i, Weaponid, Ammo );
  40.         }
  41. }
  42.  
  43. stock ResetAllPlayersCash()
  44. {
  45.         foreach(Player, i)
  46.         {
  47.                 ResetPlayerMoney( i );
  48.         }
  49.        
  50.         return 1;
  51. }
  52.  
  53. stock KickAllPlayers()
  54. {
  55.         foreach(Player, i)
  56.         {
  57.                 Kick( i );
  58.         }
  59.  
  60.         return 1;
  61. }
  62.  
  63. stock BanAllPlayers()
  64. {
  65.         foreach(Player, i)
  66.         {
  67.                 Ban( i );
  68.         }
  69.  
  70.         return 1;
  71. }
  72.  
  73. stock SetAllPlayersVirtualWorld( World )
  74. {
  75.         foreach(Player, i)
  76.         {
  77.                 SetPlayerVirtualWorld( i, World );
  78.         }
  79.  
  80.         return 1;
  81. }
  82.  
  83. stock SetAllPlayersSkin( SkinID )
  84. {
  85.         foreach(Player, i)
  86.         {
  87.                 SetPlayerSkin( i, SkinID );
  88.         }
  89.  
  90.         return 1;
  91. }
  92.  
  93. stock SetAllPlayersInterior( Interior )
  94. {
  95.         foreach(Player, i)
  96.         {
  97.                 SetPlayerInterior( i, Interior );
  98.         }
  99.  
  100.         return 1;
  101. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top