Advertisement
Lzy

[SAMP] Server Rules Dialog

Lzy
May 9th, 2016
669
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. // ServerRulesDialog by Lzy
  2. #include <a_samp>
  3. #pragma tabsize 0
  4.  
  5. public OnFilterScriptInit()
  6. {
  7. print("\n--------------------------------------");
  8. print(" ServerRulesDialog by Lzy");
  9. print("--------------------------------------\n");
  10. return 1;
  11. }
  12.  
  13. public OnPlayerConnect(playerid)
  14. {
  15. ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "{00FFFF}Server Rules", "{007FFF}Rule 1: ...\n\n{007FFF}Rule 2: ...\n\n{007FFF}Rule 3: ...\n\n{007FFF}Rule 4: ...\n\n{007FFF}Rule 5: ...\n\n{FF0000}Decline the rules above you will be KICKED!", "Accept", "Decline");
  16. SendClientMessage(playerid,0xFFFF00,"ServerRules by : Lzy");
  17. return 1;
  18. }
  19.  
  20. forward KickPublic(playerid);
  21. public KickPublic(playerid) { Kick(playerid); }
  22. stock KickWithMessage(playerid, color, message[])
  23. {
  24. SendClientMessage(playerid, color, message);
  25. SetTimerEx("KickPublic", 1000, 0, "d", playerid);
  26. }
  27.  
  28. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  29. {
  30. if(dialogid == 1)
  31. {
  32. if(response)
  33. {
  34. SendClientMessage(playerid,0xFF0000, "[SERVER]: {FF7F24}You have Accepted the rules---Have fun!");
  35. }
  36. else
  37. {
  38. KickWithMessage(playerid,0xFF0000FF, "[SERVER]: You have Decline the rules and kicked by ther server ! ");
  39. }
  40. return 1;
  41. }
  42. return 0;
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement