Raised This Month: $ Target: $400
 0% 

When a player join late - HideNseeK


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
flipz93
New Member
Join Date: Oct 2007
Old 10-21-2007 , 14:20   When a player join late - HideNseeK
Reply With Quote #1

Hi! I have a question about the hidenseek plugin, made ny OneEyed.
When a player join Ts after the countdown have stopped they don't get the smoke and flashes (I have fixed so no one can get weapon). Is it possilbe to change the script so you can get smoke and flashes all the time on a round when you join T?

I think I need to change something there:
Quote:
public plugin_init() {
register_plugin("Hide n Seek", "1.0", "OneEyed")

if(!cvar_exists("hide_n_seek"))
register_cvar("hide_n_seek","0")
if(!cvar_exists("pub_type"))
register_cvar("pub_type","2")
if(!cvar_exists("hide_n_seek_timer"))
register_cvar("hide_n_seek_timer","10")

register_concmd("amx_begin", "startSeek", ADMIN_SLAY, "Starts Hide n Seek for Tournament")
register_concmd("amx_pub", "startPubSeek", ADMIN_SLAY, "Starts Hide n Seek for Pub")
register_concmd("amx_team", "setTeamName", ADMIN_SLAY, "<team # 1|2> <^"name^"> - Sets specific team name.")

register_logevent("StartRound",2,"0=World triggered", "1=Round_Start")
register_logevent("EndRound" ,2,"0=World triggered", "1=Round_Draw", "1=Round_End")

register_event("CurWeapon", "Switched", "be")
register_event( "ResetHUD", "resetHud", "be" )

round = 1
timer = get_cvar_num("hide_n_seek_timer")
overtime = 3
gmsgScreenFade = get_user_msgid("ScreenFade")
maxplayers = get_maxplayers()

//FakeEnt Thinking, (handles better with engine)
fakeEnt = create_entity("info_target")
entity_set_string(fakeEnt,EV_SZ_classname,"se rverFrame")
register_think("serverFrame","server_fakeFram e")

//Scoreboard thinking
scoreB = create_entity("info_target")
entity_set_string(scoreB,EV_SZ_classname,"sco reBoard")
register_think("scoreBoard","displayScoreBoar d")
}
And there:
Quote:
public StartRound() {
new t, c
for(new x=1;x<=maxplayers;x++) {
if(!is_user_connected(x)) continue
if(get_user_team(x) == 1) t = 1
if(get_user_team(x) == 2) c = 1
}
//Give team weapons on start round, and begin rounds
if(c == 1 && t == 1) {
if(get_cvar_num("hide_n_seek") == 1) {
if(round == 0) { // Knife Round Stuff
format(g_message,255,"Knife Round^nWinning Team will become [Hiders] first.")
for(new a=1;a<=maxplayers;a++) {
if(is_user_alive(a))
set_task(1.5,"stripAndGiveKnife",a)
}
set_hudmessage(255, 0, 0, -1.0, 0.5, 0, 1.0, 7.0, 0.1, 0.1, 4)
show_hudmessage(0,"%s",g_message)
entity_set_float(scoreB,EV_FL_nextthink,halfl ife_time() + 0.01)
}
if(round == 1) { // Begin Round 1 stuff
timer = get_cvar_num("hide_n_seek_timer")
entity_set_float(fakeEnt,EV_FL_nextthink,half life_time() + 0.01)
for(new a=1;a<=maxplayers;a++) {
if(get_user_team(a) == 1 && is_user_alive(a))
set_task(1.5,"HiderItems",a)
if(get_user_team(a) == 2 && is_user_alive(a))
set_task(1.5,"SeekerItems",a)
}
}
}
if(get_cvar_num("hide_n_seek") == 2) {
if(round >= 1) { // Begin Round 1 stuff
timer = get_cvar_num("hide_n_seek_timer")
entity_set_float(fakeEnt,EV_FL_nextthink,half life_time() + 0.01)
for(new a=1;a<=maxplayers;a++) {
if(get_user_team(a) == 1 && is_user_alive(a))
set_task(1.5,"HiderItems",a)
if(get_user_team(a) == 2 && is_user_alive(a))
set_task(1.5,"SeekerItems",a)
}
}
}
}
}
And there:
Quote:
public resetHud(id) {
if(is_user_alive(id) && get_cvar_num("hide_n_seek") > 0) {
cs_set_user_money(id, 0)
new args[1]
args[0] = id
set_task(5.0,"modelCheck",1234,args,1,"a",0)
}
}
Attached Files
File Type: sma Get Plugin or Get Source (hidenseek.sma - 900 views - 22.8 KB)

Last edited by flipz93; 10-30-2007 at 06:35.
flipz93 is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:13.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode