Advertisement
rymax99

Random messages

Jul 22nd, 2015
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.53 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. public OnFilterScriptInit()
  4. {
  5.     print("Random messages by Rymax99 loaded");
  6.     SetTimer("randMsg", 120000, 1); //2 minutes, repeating timer
  7.     return 1;
  8. }
  9.  
  10. public OnFilterScriptExit()
  11. {
  12.     print("Random messages unloaded");
  13.     return 1;
  14. }
  15.  
  16. new randmsg[][144] =
  17. {
  18.     "test1",
  19.     "test2",
  20.     "test3"
  21. };
  22.  
  23. forward randMsg();
  24. public randMsg()
  25. {
  26.     new rand = random(sizeof(randmsg)),
  27.         string[144];
  28.     format(string, sizeof(string), "[TIP]: %s", randmsg[rand], sizeof(randmsg));
  29.     SendClientMessageToAll(-1, string);
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement