Guest User

Untitled

a guest
Oct 3rd, 2019
282
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.70 KB | None | 0 0
  1. #include <a_samp> // Include
  2.  
  3. #define CURRENT_MESSAGES 5
  4. // Ovaj Broj Poruka Uvek Mora Biti Tacan.
  5.  
  6. #define MESSAGE_COLOR 0x4169E1FF
  7. // Ovo je Boja Istih, Moze se Editovati.
  8.  
  9. #define MESSAGE_TIME 250
  10. // Sekunde u kojima se racuna koliko treba poruci da se Ispise/Prekuca.
  11.  
  12. new RP[CURRENT_MESSAGES][128];
  13. forward SendRandomMessage();
  14. public OnFilterScriptInit()
  15. {
  16. print("\n------------------------------------------");
  17. print(" Pet Poruka");
  18. print(" Random Poruke");
  19. print(" Volter v1.0");
  20. print("--------------------------------------------\n");
  21. AddRandomMessage("{f956ff}[DONACIJE] {FFFFFF}Ukoliko zelite pogledati listu donacija, kucajte {f956ff}/donacije.");
  22. AddRandomMessage("{00869e}[VOZILO] {FFFFFF}Na serveru mozete posjedovati 4 vozila, listu vozila gledate komandom {00869e}/v(/vozilo).");
  23. AddRandomMessage("{54d9ff}[POMOC] {FFFFFF}Trenutni PayDay iznosi {54d9ff}15.000$,{FFFFFF} ukoliko zelite vecu cifru, radite poslove.");
  24. AddRandomMessage("{6dff54}[BUG-FIX] {FFFFFF}Ukoliko pronadjete {6dff54}BUG,{FFFFFF} prijavite ga komandom {6dff54}/reportbug.");
  25. AddRandomMessage("{f4aa42}[TEAMSPEAK] {FFFFFF}Pricajte sa ostalim igracima na teamspeaku - {f4aa42}/teamspeak.");
  26. SetTimer("SendRandomMessage", MESSAGE_TIME * 1000, 1);
  27. return 1;
  28. }
  29.  
  30. public SendRandomMessage()
  31. {
  32. static lastmessage = 0;
  33. new rand = random(CURRENT_MESSAGES);
  34. while(rand == lastmessage && CURRENT_MESSAGES != 1) { rand = random(CURRENT_MESSAGES); }
  35. lastmessage = rand;
  36. SendClientMessageToAll(MESSAGE_COLOR, RP[lastmessage]);
  37. }
  38.  
  39. stock AddRandomMessage(text[])
  40. {
  41. for(new m; m < CURRENT_MESSAGES; m++)
  42. {
  43. if(!strlen(RP[m]))
  44. {
  45. strmid(RP[m], text, 0, 127);
  46. return 1;
  47. }
  48. }
  49. return 0;
  50. }
Advertisement
Add Comment
Please, Sign In to add comment