Advertisement
Guest User

Untitled

a guest
Feb 29th, 2020
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.69 KB | None | 0 0
  1. #include <a_samp>
  2. #include <Kolory>
  3.  
  4. main(){}
  5.  
  6. public OnGameModeInit()
  7. {
  8.  
  9. print("Gamemode by Kaciano zostal pomyslnie wlaczony!"); ///autor gm ZAKAZUJE ZMIANY
  10. for(new i=0; i<311; i++) AddPlayerClass(i, 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0);
  11. SetGameModeText("PSZ 1.0.0 "); ///nazwa serwera
  12. return 1;
  13. }
  14.  
  15.  
  16. public OnPlayerSpawn(playerid)
  17.  
  18. SetPlayerPos(playerid, 1531.1624,751.0803,11.0234);
  19.  
  20. public OnPlayerConnect(playerid)
  21. {
  22. for(new i; i < 50; i++) SendClientMessage(playerid, COLOR_RED, " ");
  23. SendClientMessage(playerid, COLOR_YELLOW, "- - - - - - - - - - - - - - - - - - - - - -");
  24. SendClientMessage(playerid, COLOR_RED, "Witamy na Polskim Zadymka Serwerze ! ! !!");
  25. SendClientMessage(playerid, COLOR_YELLOW, "- - - - - - - - - - - - - - - - - - - - - -");
  26. ///Nazwa Serwera
  27. new pName[MAX_PLAYER_NAME];
  28. new string[48];
  29. GetPlayerName(playerid, pName, sizeof(pName));
  30. format(string, sizeof(string), "%s Dołączył Do Serwera !.", pName);
  31. SendClientMessageToAll(0xAAAAAAAA, string);
  32. ///gracz dołączył do serwera !!
  33.  
  34. return 1;
  35.  
  36. }
  37. public OnPlayerDisconnect(playerid, reason)
  38. {
  39. new pName[MAX_PLAYER_NAME], string[56];
  40. GetPlayerName(playerid, pName, sizeof(pName));
  41. switch(reason)
  42. {
  43. case 0: format(string, sizeof(string), "%s Wyszedł z servera. (Lost Connection)", pName);
  44. case 1: format(string, sizeof(string), "%s Opuścił Serwer. (Leaving)", pName);
  45. case 2: format(string, sizeof(string), "%s Dostał Kicka. (Kicked)", pName); ///wyszedł z serwera
  46. }
  47. SendClientMessageToAll(0xAAAAAAAA, string);
  48. return 1;
  49. }
  50. new str[128];
  51.  
  52.  
  53. public OnPlayerText(playerid, text[])
  54. {
  55.  
  56.  
  57. if(anty(text) && !IsPlayerAdmin(playerid))
  58. {
  59. format(str,256,"*** Gracz %s został zbanowany z Servera. Powód : Reklamowanie IP/STRONY",PlayerName(playerid)); ///banowanie za reklame !
  60. SendClientMessageToAll(0xFF0000FF, str);
  61. Ban(playerid);
  62. return 0;
  63.  
  64. }
  65.  
  66.  
  67. return 1;
  68. }
  69.  
  70. stock anty(string[])
  71. {
  72. if(strfind(string,"www.",true)!=-1 || strfind(string,"http://",true)!=-1 || strfind(string,".com",true)!=-1 || strfind(string,".net",true)!=-1 || strfind(string,"91.",true)!=-1 || strfind(string,"195.",true)!=-1 || strfind(string,".pl",true)!=-1|| strfind(string,".org",true)!=-1)
  73. return true;
  74. return false;
  75. }
  76.  
  77.  
  78. stock PlayerName(playerid)
  79. {
  80. new name[MAX_PLAYER_NAME];
  81. GetPlayerName(playerid, name, MAX_PLAYER_NAME); ///tu się konczy !
  82. return name;
  83. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement