Advertisement
Kovacs_Bela

[FS] Teszt mód

Oct 15th, 2011
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.90 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. #define menu 735
  4.  
  5. new bool:teszt;
  6.  
  7. public OnPlayerConnect(playerid)
  8. {
  9.     if(teszt == true)
  10.     {
  11.     SendClientMessage(playerid,0xff0000ff,"A tulaj most éppen tesztel valamit, ne zavard!");
  12.         Kick(playerid);
  13.     }
  14.     return 1;
  15. }
  16.  
  17. public OnPlayerCommandText(playerid,commandtext[])
  18. {
  19.     if(strcmp("/tesztmode",commandtext,true) == 0)
  20.     {
  21.     if(IsPlayerAdmin(playerid))
  22.     {
  23.        ShowPlayerDialog(playerid,menu,DIALOG_STYLE_LIST,"Tesztmód","Bekapcsol\nKikapcsol","Választ","");
  24.         }
  25.         return 1;
  26.     }
  27.     return 0;
  28. }
  29.  
  30. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  31. {
  32.     if(dialogid == menu)
  33.     {
  34.     switch(listitem)
  35.     {
  36.         case 0: teszt = true, SendClientMessage(playerid,-1,"Tesztelési mód be!");
  37.         case 1: teszt = false, SendClientMessage(playerid,-1,"Tesztelési mód ki!");
  38.         }
  39.     }
  40.     return 1;
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement