Jump to content
GIGN Forum

Round Restart!


Recommended Posts

Man serveri ir tads plugins amx_restartgame! Tas 3 reizes restarte roundu un viss sakas! Bet man kommanda jaraksta pasam, vina neuzliekas automatiski katras mapes sakuma! Varbut kads var izlabot?

/* AMXMOD X script.


#include <amxmodx>
#include <amxmisc>

public amx_restartgame(id,level,cid)
{
   if (!cmd_access(id,level,cid,0))
   {
       return PLUGIN_CONTINUE
   }
   set_hudmessage(0, 200, 0, -1.0, 0.40, 0, 6.0, 6.0, 0.1, 0.1, 1)
   show_hudmessage(0,"Pec 3 restart spele saksies")
   set_task(3.0, "rround")
   set_task(6.0, "rround")
   set_task(9.0, "rround")
   set_task(11.0, "lmessage")
   return PLUGIN_HANDLED
}

public rround()
{
   server_cmd("sv_restart 1")
}

public lmessage()
{
   new sv_pass[32], players[32], playernum
   set_hudmessage(0, 200, 0, -1.0, 0.40, 0, 6.0, 6.0, 0.1, 0.1, 3)
   show_hudmessage(0,"Mes sakam! Nosauj kadu un juties ka varonis!")
   get_cvar_string("sv_password",sv_pass,32)
   set_hudmessage(255, 255, 255, -1.0, 0.80, 0, 6.0, 6.0, 0.1, 0.1, 4)
   get_players(players,playernum)
   for(new a = 1; a < playernum; ++a)
   {
       if ( get_user_team(players[a]) < 3 )
       {
           show_hudmessage(players[a],"Server Password: %s",sv_pass)
       }
   }
}

public plugin_init()
{
   register_plugin("Restart Game","0.5","BenZoN - Rich - Shift")
   register_clcmd("amx_restartgame","amx_restartgame",ADMIN_CFG,"amx_restartgame - Triple Restart For Match")
   return PLUGIN_CONTINUE
}

Un vel 1 maza problemina! Man visu laiku stav ff on! Kaut vai es server.cfg nomainu, kaut vai amx_cvar nomainu katras mapes sakuma atkal paradas!

Edited by tomix1
Link to comment
Share on other sites

#include <amxmodx>

#include <amxmisc>

public amx_restartgame()

{

set_hudmessage(0, 200, 0, -1.0, 0.40, 0, 6.0, 6.0, 0.1, 0.1, 1)

show_hudmessage(0,"Pec 3 restart spele saksies")

set_task(3.0, "rround")

set_task(6.0, "rround")

set_task(9.0, "rround")

set_task(11.0, "lmessage")

return PLUGIN_HANDLED

}

public rround()

{

server_cmd("sv_restart 1")

}

public lmessage()

{

new sv_pass[32], players[32], playernum

set_hudmessage(0, 200, 0, -1.0, 0.40, 0, 6.0, 6.0, 0.1, 0.1, 3)

show_hudmessage(0,"Mes sakam! Nosauj kadu un juties ka varonis!")

get_cvar_string("sv_password",sv_pass,32)

set_hudmessage(255, 255, 255, -1.0, 0.80, 0, 6.0, 6.0, 0.1, 0.1, 4)

get_players(players,playernum)

for(new a = 1; a < playernum; ++a)

{

if ( get_user_team(players[a]) < 3 )

{

show_hudmessage(players[a],"Server Password: %s",sv_pass)

}

}

}

public plugin_init()

{

register_plugin("Restart Game","0.5","BenZoN - Rich - Shift")

set_task(30.0,"amx_restartgame")

}

Nekaadas script kljudas nelaboju.. tur tas ir Daudz... anyway. Shim vajadzeetu +/- izdariit ko prasi.

Link to comment
Share on other sites

Shine, tikai ir 1 nepilnība... Piemēram, ja sākas mape un nav cilvēku tas restarts notiks pēc x ilga laika... Un, kad būs "Game commencing", tad nebūs tā restarta... Tāpēc vai Tu varētu pielabot, lai tikai tad notiktu restarts... :? :lalala:

Link to comment
Share on other sites

#include <amxmodx>

new bool:first=true

public plugin_init() {register_plugin("Restart","0.7","Sh!nE*");register_logevent("round_start", 2, "1=Round_Start");}

public round_start() {

new players[32],num

get_players(players,num)

if(num >= 2 && first) {set_task(1.0,"riistart");first=false;}

}

public riistart() {

new text[64]

format(text,63,"Speele saaksies pec 3 rr")

show_hud(text)

set_task(3.0, "rround")

set_task(6.0, "rround")

set_task(9.0, "rround")

set_task(11.0, "lmessage")

}

public rround() server_cmd("sv_restart 1")

public lmessage() {

new text[64]

format(text,63,"Kick some ballz!")

show_hud(text)

}

show_hud(text[]) {

set_hudmessage(0, 200, 0, -1.0, 0.40, 0, 6.0, 6.0, 0.1, 0.1, 3)

show_hudmessage(0,text)

}

Link to comment
Share on other sites

un nomaini sho rindinju:

pret

Kkas nav.. Kad nomainu visu tad vinsh uztaisa tikai 1rr! Man vajag 3 un lai vinji visi ir peec kaartas bez

liela laika atstatuma! Taka uzreiz taisiitu 3rr..

Link to comment
Share on other sites

#include <amxmodx>

new bool:first=true

public plugin_init() {register_plugin("Restart","0.7","Sh!nE*");register_logevent("round_start", 2, "1=Round_Start");}

public round_start() {

new players[32],num

get_players(players,num)

if(num >= 2 && first) {set_task(1.0,"riistart");first=false;}

}

public riistart() {

new text[64]

format(text,63,"Speele saaksies pec 3 rr")

show_hud(text)

set_task(3.0, "rround")

set_task(11.0, "lmessage")

}

public rround() {server_cmd("sv_restart 1");server_cmd("sv_restart 1");server_cmd("sv_restart 1");}

public lmessage() {

new text[64]

format(text,63,"Kick some ballz!")

show_hud(text)

}

show_hud(text[]) {

set_hudmessage(0, 200, 0, -1.0, 0.40, 0, 6.0, 6.0, 0.1, 0.1, 3)

show_hudmessage(0,text)

}

EDIT: - 14:30

Edited by shine
Link to comment
Share on other sites

Izmeegjini sho:

#include <amxmodx>

new bool:first=true

public plugin_init() {register_plugin("Restart","0.7","Sh!nE*");register_logevent("round_start", 2, "1=Round_Start");}

public round_start() {

new players[32],num

get_players(players,num)

if(num >= 2 && first) {set_task(1.0,"riistart");first=false;}

}

public riistart() {

new text[64]

format(text,63,"Speele saaksies pec 3 rr")

show_hud(text)

new Float:tempy=0.1

for(new i;i < 3;i++) {

set_task(tempy,"rround")

tempy += 0.1

}

set_task(3.0, "lmessage")

}

public rround() server_cmd("sv_restart 1")

public lmessage() {

new text[64]

format(text,63,"Kick some ballz!")

show_hud(text)

}

show_hud(text[]) {

set_hudmessage(0, 200, 0, -1.0, 0.40, 0, 6.0, 6.0, 0.1, 0.1, 3)

show_hudmessage(0,text)

}

es iisti nez shis itka ir vieglaaks veids.. bet nekad neesmu izmantojis shaadaa veidaa set_task... nu vari izmegjinaat sho:

#include <amxmodx>

new bool:first=true

public plugin_init() {register_plugin("Restart","0.7","Sh!nE*");register_logevent("round_start", 2, "1=Round_Start");}

public round_start() {

new players[32],num

get_players(players,num)

if(num >= 2 && first) {set_task(1.0,"riistart");first=false;}

}

public riistart() {

new text[64]

format(text,63,"Speele saaksies pec 3 rr")

show_hud(text)

set_task(0.1,"rround",_,_,_,_,3)

set_task(3.0, "lmessage")

}

public rround() server_cmd("sv_restart 1")

public lmessage() {

new text[64]

format(text,63,"Kick some ballz!")

show_hud(text)

}

show_hud(text[]) {

set_hudmessage(0, 200, 0, -1.0, 0.40, 0, 6.0, 6.0, 0.1, 0.1, 3)

show_hudmessage(0,text)

}

Edited by shine
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...