←  Szukam pluginu

AMXX.pl: Support AMX Mod X i SourceMod

»

Liczenie map

  • +
  • -
WojtuS - zdjęcie WojtuS 18.11.2011

Szukam pluginu np zamiast next map i mapchoser !

Co on ma robić?

- odliczać rundy do końca mapy np 30 rund i zmiana obojętnie kto wygra
- po zakończeniu odliczania ma napisać na czacie że rozkrywa zakończona i reset serwera czyli zmienia na mapkę np de_dust2 ( oczywiście bez głosowania )


Plugin będzie funkcjonował na serwie only de_dust2 .


Proszę . !
Odpowiedz

  • +
  • -
Brylant - zdjęcie Brylant 18.11.2011

#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>

#define PLUGIN "runda"
#define VERSION "1.0"
#define AUTHOR "AmD"

new rounds, hudhandler

public plugin_init()
{
		register_plugin(PLUGIN, VERSION, AUTHOR)

		RegisterHam(Ham_Spawn, "player", "client_spawn", 1)

		register_logevent("round_end", 2, "1=Round_End")

		register_event("TextMsg","restart_roundsnum","a","2&#Game_C"/*,"2&#Game_w"*/)

		hudhandler = CreateHudSyncObj()
}

public round_end()
{
		rounds ++
}

public restart_roundsnum()
{
		rounds = 0
}

public client_spawn(id)
{	  
		set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), -1.0, 0.3, 2, 0.5, 5.0)

		ShowSyncHudMsg(id, hudhandler, "= Rozpoczyna sie Runda %d =", rounds)  
}

w server.cfg
mp_winlimit "30"

Użytkownik Brylant edytował ten post 18.11.2011 18:21
Odpowiedz

  • +
  • -
WojtuS - zdjęcie WojtuS 18.11.2011

dobra ide sprawdzać .

błąd jest w kompilacji



Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright © 1997-2006 ITB CompuPhase, AMX Mod X Team

mapka.sma(33) : error 001: expected token: "}", but found "-end of file-"

1 Error.
Could not locate output file mapka.amxx (compile failed).

pewnie brakuje klamry :P
Odpowiedz

  • +
  • -
Brylant - zdjęcie Brylant 18.11.2011

Poprawione...

#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>

#define PLUGIN "runda"
#define VERSION "1.0"
#define AUTHOR "AmD"

new rounds, hudhandler

public plugin_init()
{
                register_plugin(PLUGIN, VERSION, AUTHOR)

                RegisterHam(Ham_Spawn, "player", "client_spawn", 1)

                register_logevent("round_end", 2, "1=Round_End")

                register_event("TextMsg","restart_roundsnum","a","2&#Game_C"/*,"2&#Game_w"*/)

                hudhandler = CreateHudSyncObj()
}

public round_end()
{
                rounds ++
}

public restart_roundsnum()
{
                rounds = 0
}

public client_spawn(id)
{         
                set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), -1.0, 0.3, 2, 0.5, 5.0)

                ShowSyncHudMsg(id, hudhandler, "= Rozpoczyna sie Runda %d =", rounds)  
}

Użytkownik Brylant edytował ten post 18.11.2011 18:25
Odpowiedz

  • +
  • -
WojtuS - zdjęcie WojtuS 18.11.2011

Nie o taki mi plughin chodzi nie działa to co mi dałeś . i to jeszcze zbugowane .

czyli po wygranej rundzie pisze zamias runda 1 to 0 zamiast 1 to 2 zamiast 3 to 5 ...
Odpowiedz