hlmod.hu
https://hlmod.hu/

Chat parancsok [SZERKESZTÉS] PLEASE HELP ME!
https://hlmod.hu/viewtopic.php?f=46&t=8246
Oldal: 1 / 1

Szerző:  UlTiMaT3 [ 2013.04.26. 02:06 ]
Hozzászólás témája:  Chat parancsok [SZERKESZTÉS] PLEASE HELP ME!

Sziasztok! Nekem egy olyan plugin kellene, hogy ha az admin pl beírja Chatbe: !spec UlTi vagy !kick UlTi vagy !ban UlTi 5 PRÓBA BAN! ( !ban - Parancs, UlTi - Játékos neve, 5 - Ban ideje, PRÓBA BAN! - A kitiltás OKa )

Ezeket kellene csinálnia a példa szerint a pluginnak. Tehát hogy ne keljen végig írni a nevét annak az illetőnek akivel a parancsokat akarom végrehajtani, illetve ne keljen admin menü, mert (tudtommal) !parancs - A Játékosok is látják. /parancs - A játékosok NEM látják.

Ami fontos hogy tudjon a plugin:
SMA Forráskód: [ Mindet kijelol ]
  1. !ban, !kick, !slay, !gag, !silent, !spec
(Az nem baj ha több parancsot is tud a plugin, csak az a lényeg hogy ezeket amit leírtam tudja!

Előre is köszönöm fáradozásotokat!

Aki megcsinálja, megy a KÖSZÖNÖM!

Szerző:  CrB [ 2013.08.14. 16:39 ]
Hozzászólás témája:  Re: Chat parancsok [SZERKESZTÉS] PLEASE HELP ME!

Szia egy részét sikerült megírjam aszthiszem a silent és a ban maradt ki (silent nemtudom micsinál, ban - nemtudom h kéne megoldani a reason-t) amit sikerült azt teszteldt kicsit jobban belemerülök és bővítem ha senki más nem csinálja meg

használat !kick játékosneve !gag játékosneve !spec játékosneve !slay játékosneve
SMX Forráskód: [ Mindet kijelol ]
  1. /* Plugin Template generated by Pawn Studio */
  2.  
  3. #include <sourcemod>
  4.  
  5. public Plugin:myinfo =
  6. {
  7. name = "Parancsok",
  8. author = "qKKKJ",
  9. description = "valami",
  10. version = "1.0",
  11. url = "www.warhosting.hu"
  12. }
  13.  
  14. public OnPluginStart()
  15. {
  16. RegAdminCmd("kick", Cmd_Kick, ADMFLAG_KICK, "Kickeleshez ird be a jtekos nevet");
  17. RegAdminCmd("slay", Cmd_slay, ADMFLAG_KICK, "Megoleshez ird be a jtekos nevet");
  18. RegAdminCmd("gag", Cmd_gag, ADMFLAG_KICK, "Gagolashoz ird be a jtekos nevet");
  19. RegAdminCmd("spec", Cmd_spec, ADMFLAG_KICK, "specbe rakashoz ird be a jtekos nevet");
  20. }
  21. public Action:Cmd_Kick(client,args)
  22. {
  23. if (args < 1)
  24. {
  25. PrintToChat(client, "Hasznalat: kick <name>");
  26. return Plugin_Handled;
  27. }
  28.  
  29. new String:name[32], target = -1;
  30. GetCmdArg(1, name, sizeof(name));
  31.  
  32. for (new i=1; i<=MaxClients; i++)
  33. {
  34. if (!IsClientConnected(i))
  35. {
  36. continue;
  37. }
  38. decl String:other[32];
  39. GetClientName(i, other, sizeof(other));
  40. if (StrEqual(name, other))
  41. {
  42. target = i;
  43. }
  44. }
  45.  
  46. if (target == -1)
  47. {
  48. PrintToChat(client, "Nem talalhato a jtekos: \"%s\"", name);
  49. return Plugin_Handled;
  50. }
  51.  
  52. ServerCommand("kickid %d", GetClientUserId(target));
  53.  
  54. return Plugin_Handled;
  55. }
  56. public Action:Cmd_slay(client,args)
  57. {
  58. if (args < 1)
  59. {
  60. PrintToChat(client, "Hasznalat: slay <name>");
  61. return Plugin_Handled;
  62. }
  63.  
  64. new String:name[32], target = -1;
  65. GetCmdArg(1, name, sizeof(name));
  66.  
  67. for (new i=1; i<=MaxClients; i++)
  68. {
  69. if (!IsClientConnected(i))
  70. {
  71. continue;
  72. }
  73. decl String:other[32];
  74. GetClientName(i, other, sizeof(other));
  75. if (StrEqual(name, other))
  76. {
  77. target = i;
  78. }
  79. }
  80.  
  81. if (target == -1)
  82. {
  83. PrintToChat(client, "Nem talalhato a jatekos: \"%s\"", name);
  84. return Plugin_Handled;
  85. }
  86.  
  87. ServerCommand("sm_slay %s", name);
  88.  
  89. return Plugin_Handled;
  90. }
  91. public Action:Cmd_gag(client,args)
  92. {
  93. if (args < 1)
  94. {
  95. PrintToChat(client, "Hasznalat: gag <name>");
  96. return Plugin_Handled;
  97. }
  98.  
  99. new String:name[32], target = -1;
  100. GetCmdArg(1, name, sizeof(name));
  101.  
  102. for (new i=1; i<=MaxClients; i++)
  103. {
  104. if (!IsClientConnected(i))
  105. {
  106. continue;
  107. }
  108. decl String:other[32];
  109. GetClientName(i, other, sizeof(other));
  110. if (StrEqual(name, other))
  111. {
  112. target = i;
  113. }
  114. }
  115.  
  116. if (target == -1)
  117. {
  118. PrintToChat(client, "Nem talalhato a jatekos: \"%s\"", name);
  119. return Plugin_Handled;
  120. }
  121.  
  122. ServerCommand("sm_gag %s", name);
  123.  
  124.  
  125. return Plugin_Handled;
  126. }
  127. public Action:Cmd_spec(client,args)
  128. {
  129. if (args < 1)
  130. {
  131. PrintToChat(client, "Hasznalat: spec <name>");
  132. return Plugin_Handled;
  133. }
  134.  
  135. new String:name[32], target = -1;
  136. GetCmdArg(1, name, sizeof(name));
  137.  
  138. for (new i=1; i<=MaxClients; i++)
  139. {
  140. if (!IsClientConnected(i))
  141. {
  142. continue;
  143. }
  144. decl String:other[32];
  145. GetClientName(i, other, sizeof(other));
  146. if (StrEqual(name, other))
  147. {
  148. target = i;
  149. }
  150. }
  151.  
  152. if (target == -1)
  153. {
  154. PrintToChat(client, "Nem talalhato a jatekos: \"%s\"", name);
  155. return Plugin_Handled;
  156. }
  157.  
  158. ChangeClientTeam(target, 1)
  159.  
  160.  
  161. return Plugin_Handled;
  162. }

Oldal: 1 / 1 Minden időpont UTC+02:00 időzóna szerinti
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/