Advertisement
Guest User

Problem [ZCMD]

a guest
Jan 18th, 2013
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 2.88 KB | None | 0 0
  1. /*
  2.         ////////////////////////////////////////////////////////////////////
  3.         /           ******      *****       ******      *****       ****** /
  4.         /           *           *    *      *           *    *      *      /
  5.         / Made by:  *           *    *      ****        *     *     ****   /
  6.         /           ****        *****       *           *     *     *      /
  7.         /           *           *    *      *           *    *      *      /
  8.         /           *           *     *     ******      *****       ****** /
  9.         ////////////////////////////////////////////////////////////////////
  10. */
  11. #define FILTERSCRIPT
  12.  
  13. #include <a_samp>
  14. #include <zcmd>
  15.  
  16.  
  17. public OnFilterScriptInit()
  18. {
  19.     print("\n**************************************");
  20.     print(" This Filterscript is made by Frede");
  21.     print("**************************************\n");
  22.     return 1;
  23. }
  24.  
  25. public OnFilterScriptExit()
  26. {
  27.     SendClientMessageToAll(0xFFFFAA, "SOMEBODY IS TRYING TO REMOVE /problem   STOP HIM!!!!!!!!");
  28.     return 1;
  29. }
  30.  
  31.  
  32. public OnPlayerConnect(playerid)
  33. {
  34.     SendClientMessage(playerid, 0xFFFFAA, "If you got a problem, use /problem");
  35.     return 1;
  36. }
  37.  
  38. public OnPlayerDisconnect(playerid, reason)
  39. {
  40.     return 1;
  41. }
  42.  
  43. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  44. {
  45.     if(dialogid == 2222)
  46.     {
  47.         if(response)
  48.         {
  49.             if(listitem == 0)
  50.             {
  51.                 SpawnPlayer(playerid);
  52.             }
  53.             if(listitem == 1)
  54.             {
  55.                 SeePlayers(playerid);
  56.             }
  57.             if(listitem == 2)
  58.             {
  59.                 ShowPlayerDialog(playerid, 2223, DIALOG_STYLE_INPUT, "Problems", "Enter your problem below", "NEXT", "Cancel");
  60.             }
  61.         }
  62.         return 1;
  63.     }
  64.     if(dialogid == 2223)
  65.     {
  66.         if(response)
  67.         {
  68.             new File:ftw=fopen("Problems.txt", io_append);
  69.             if(ftw)
  70.             {
  71.                 new mytext[256], plstring[256], plname[MAX_PLAYER_NAME+1];
  72.                 GetPlayerName(playerid, plname, sizeof(plname));
  73.                 strcat(mytext, "plname: ");
  74.                 strcat(mytext, inputtext);
  75.                 strcat(plstring, plname);
  76.                 strcat(plstring, " have a problem: ");
  77.                 strcat(plstring, inputtext);
  78.                 SendClientMessageToAll(0xFFFFFFFF,plstring);
  79.                 new mystring[30];
  80.                 format(mystring, 30, "%s\r\n", mytext);
  81.                 fwrite(ftw, mystring);
  82.                 fclose(ftw);
  83.             }
  84.         }
  85.         return 1;
  86.     }
  87.     return 0;
  88. }
  89.  
  90. CMD:problem(playerid, params[])
  91. {
  92.     ShowPlayerDialog(playerid, 2222, DIALOG_STYLE_LIST, "Problems", "Spawn problem\nCant see names\nNon of thease", "Next", "close");
  93.     return 1;
  94. }
  95.  
  96.  
  97. stock SeePlayers(playerid)
  98. {
  99.     for(new i = 0; i < MAX_PLAYERS; i++)
  100.     {
  101.             if(IsPlayerConnected(i))
  102.             {
  103.             new myname[128], string2[256];
  104.             GetPlayerName(i, myname, sizeof(myname));
  105.             format(string2, sizeof(string2),"%s", myname);
  106.             new Text3D:label = Create3DTextLabel(string2, 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
  107.             Attach3DTextLabelToPlayer(label, i, 0.0, 0.0, 0.7);
  108.             SendClientMessage(playerid, 0xFFFFFFFF, "You have putted a name on everybody");
  109.         }
  110.     }
  111. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement