Advertisement
Guest User

--- Function's

a guest
Oct 6th, 2012
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.57 KB | None | 0 0
  1. /*
  2. native GetPlayerIpEx(playerid);
  3. native GetPlayerNameEx(playerid);
  4. native SetServerPassword(string[]);
  5. native ResetServerPassword();
  6. native SetPlayerPosEx(playerid,Float:x,Float:y,Float:z,Float:angle,vw,int);
  7. native ClearChat(playerid);
  8. native GiveScore(playerid,score);
  9. native Spam(string[]);
  10. native SpamPlayer(playerid,string[]);
  11. */
  12. #include <a_samp>
  13.  
  14. stock GetPlayerIpEx(playerid)
  15. {
  16.     new pIP[55];
  17.     GetPlayerIp(playerid,pIP,sizeof(pIP));
  18.     return pIP;
  19. }
  20.  
  21. stock GetPlayerNameEx(playerid)
  22. {
  23.     new pName[MAX_PLAYER_NAME];
  24.     GetPlayerName(playerid,pName,sizeof(pName));
  25.     return pName;
  26. }
  27.  
  28. stock SetServerPassword(const string[])
  29. {
  30.     new command[124];
  31.     format(command,"password %s",string);
  32.     SendRconCommand(command);
  33.     return 1;
  34. }
  35.  
  36. stock ResetServerPassword()
  37. {
  38.     SendRconCommand("password 0");
  39.     return 1;
  40. }
  41.  
  42. stock SetPlayerPosEx(playerid,Float:x,Float:y,Float:z,Float:angle,vw,int)
  43. {
  44.     SetPlayerPos(playerid,x,y,z);
  45.     SetPlayerFacingAngle(angle);
  46.     SetPlayerVirtualWorld(playerid,vw);
  47.     SetPlayerInterior(playerid,int);
  48.     return 1;
  49. }
  50.  
  51. stock ClearChat(playerid)
  52. {
  53.     for(new i = 0; i < 100; i++)
  54.     {
  55.         SendClientMessage(playerid,-1,"");
  56.     }
  57.     return 1;
  58. }
  59.  
  60. stock GiveScore(playerid,score)
  61. {
  62.     new oldscore = GetPlayerScore(playerid);
  63.     SetPlayerScore(playerid,oldscore+score);
  64.     return 1;
  65. }
  66.  
  67. stock Spam(const string[])
  68. {
  69.     for(new i = 0; i < 200; i++)
  70.     {
  71.         SendClientMessageToAll(-1,string);
  72.     }
  73.     return 1;
  74. }
  75.  
  76. stock SpamPlayer(playerid,const string[])
  77. {
  78.     for(new i = 0; i < 200; i++)
  79.     {
  80.         SendClientMessage(playerid,-1,string);
  81.     }
  82.     return 1;
  83. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement