hlmod.hu
https://hlmod.hu/

Autómatikus Ban
https://hlmod.hu/viewtopic.php?f=29&t=27814
Oldal: 1 / 1

Szerző:  Ni[T]r0 [2017.06.16. 11:32 ]
Hozzászólás témája:  Autómatikus Ban

Sziasztok, egy olyan plugint keresek, ami azt tudja, hogy ha én beírom a chatbe azt, hogy "kecske", akkor kibannol engem a szerver autómatikusan x percre. Előre is köszi:)

Szerző:  The Peace [2017.06.16. 12:11 ]
Hozzászólás témája:  Re: Autómatikus Ban

Ni[T]r0 írta:
Sziasztok, egy olyan plugint keresek, ami azt tudja, hogy ha én beírom a chatbe azt, hogy "kecske", akkor kibannol engem a szerver autómatikusan x percre. Előre is köszi:)


  1. #include <amxmodx>
  2. #include <amxmisc>
  3.  
  4. new const Ido[][]  ={
  5.     // Ido  + Indok
  6.     { "5" , "Teszt" },
  7.     { "10", "Teszt" }
  8. };
  9.  
  10. public plugin_init() {
  11.     register_plugin("/kecske -> Ban","1.0","Levii / The Peace")
  12.    
  13.     register_clcmd("say /kecske","Bancucc")
  14. }
  15. public Bancucc(id)
  16. {
  17.     new szName[64]
  18.    
  19.     get_user_userid(id)
  20.     get_user_name(id, szName, charsmax(szName))
  21.    
  22.     server_cmd("amx_ban #%i %i ^"%s^"", get_user_userid(id), Ido[0][id], Ido[1][id])
  23.     server_print("%s  bannolta magat %i percre.  Oka: %s", szName, Ido[0][id],Ido[1][id])
  24.    
  25. }


Próbáld.

Szerző:  Zoe [2017.06.16. 12:26 ]
Hozzászólás témája:  Re: Autómatikus Ban

The Peace írta:
Ni[T]r0 írta:
Sziasztok, egy olyan plugint keresek, ami azt tudja, hogy ha én beírom a chatbe azt, hogy "kecske", akkor kibannol engem a szerver autómatikusan x percre. Előre is köszi:)


  1. #include <amxmodx>
  2. #include <amxmisc>
  3.  
  4. new const Ido[][]  ={
  5.     // Ido  + Indok
  6.     { "5" , "Teszt" },
  7.     { "10", "Teszt" }
  8. };
  9.  
  10. public plugin_init() {
  11.     register_plugin("/kecske -> Ban","1.0","Levii / The Peace")
  12.    
  13.     register_clcmd("say /kecske","Bancucc")
  14. }
  15. public Bancucc(id)
  16. {
  17.     new szName[64]
  18.    
  19.     get_user_userid(id)
  20.     get_user_name(id, szName, charsmax(szName))
  21.    
  22.     server_cmd("amx_ban #%i %i ^"%s^"", get_user_userid(id), Ido[0][id], Ido[1][id])
  23.     server_print("%s  bannolta magat %i percre.  Oka: %s", szName, Ido[0][id],Ido[1][id])
  24.    
  25. }


Próbáld.

a consthoz minek az "id" ?

U.I:
  1. /* Plugin generated by AMXX-Studio */
  2.  
  3. #include <amxmodx>
  4. #include <amxmisc>
  5.  
  6. enum _:iAdat
  7. {
  8.     iPerc,
  9.     iS[32],
  10.     iT[32]
  11. };
  12.  
  13. new const iBan[][iAdat] =
  14. {
  15.     { "5", "Teszt", "/kecske" },
  16.     { "10", "Teszt", "/asd" }
  17. };
  18.  
  19. public plugin_init()
  20. {
  21.     register_plugin("","","");
  22.    
  23.     for(new i;i < sizeof(iBan); i++)
  24.         register_clcmd("say %s", iBan[i][iT], "BanCucc");
  25. }
  26. public BanCucc(iId)
  27. {
  28.     for(new i;i < sizeof(iBan); i++)
  29.         server_cmd("amx_ban #%i %i ^"%s^"", get_user_userid(iId), iBan[i][iPerc], iBan[i][iS]);
  30. }

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