Raised This Month: $ Target: $400
 0% 

Prevent spawn after roundstart


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
padilha007
Senior Member
Join Date: Jul 2008
Old 01-25-2009 , 10:26   Prevent spawn after roundstart
Reply With Quote #1

i need a exemple to prevent spawn after round start to block "Game Commencing"
__________________

padilha007 is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 01-25-2009 , 13:42   Re: Prevent spawn after roundstart
Reply With Quote #2

Try this:
Code:
#include <amxmodx> #include <amxmisc> #include <hamsandwich> new bool:g_round_started; public plugin_init() {     register_logevent("EventRoundStart", 2, "1=Round_Start");     register_logevent("EventRoundEnd", 2, "1=Round_End");     register_event("TextMsg", "EventRoundEnd", "a", "2=#Game_Commencing", "2=#Game_will_restart_in");         RegisterHam(Ham_Spawn, "player", "FwdPlayerSpawn", 1); } public EventRoundStart() {     g_round_started = true; } public EventRoundEnd() {     g_round_started = false; } public FwdPlayerSpawn(client) {     if( g_round_started )     {         user_silentkill(client);     } }
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!

Last edited by Exolent[jNr]; 01-25-2009 at 22:56.
Exolent[jNr] is offline
padilha007
Senior Member
Join Date: Jul 2008
Old 01-25-2009 , 20:17   Re: Prevent spawn after roundstart
Reply With Quote #3

don't work =/
__________________

padilha007 is offline
BOYSplayCS
BANNED
Join Date: Apr 2008
Location: Gainesville, FL
Old 01-25-2009 , 22:41   Re: Prevent spawn after roundstart
Reply With Quote #4

Could you provide further details on why it didn't work? Like, an error message?

Are you 100% sure you have the hamsandwich module running?
BOYSplayCS is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 01-25-2009 , 22:56   Re: Prevent spawn after roundstart
Reply With Quote #5

I don't think you can block spawning.
But, you can slay after spawning.
Code updated.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
padilha007
Senior Member
Join Date: Jul 2008
Old 01-25-2009 , 23:23   Re: Prevent spawn after roundstart
Reply With Quote #6

but before slay the event is activated no?
__________________

padilha007 is offline
Dores
Veteran Member
Join Date: Jun 2008
Location: You really don't wanna k
Old 01-26-2009 , 09:47   Re: Prevent spawn after roundstart
Reply With Quote #7

Quote:
Originally Posted by padilha007 View Post
but before slay the event is activated no?
Yes. Why do you need to block the whole event?
Don't you just want to prevent the player from playing?
__________________
O o
/Ż________________________
| IMMA FIRIN' MAH LAZOR!!!
\_ŻŻŻ
Dores is offline
padilha007
Senior Member
Join Date: Jul 2008
Old 01-26-2009 , 10:30   Re: Prevent spawn after roundstart
Reply With Quote #8

my mod transfer all players to terrorists on roundstart, so if anyone go to ct the event start.
__________________

padilha007 is offline
Dores
Veteran Member
Join Date: Jun 2008
Location: You really don't wanna k
Old 01-26-2009 , 11:49   Re: Prevent spawn after roundstart
Reply With Quote #9

Quote:
Originally Posted by padilha007 View Post
my mod transfer all players to terrorists on roundstart, so if anyone go to ct the event start.
Is that what you need?

Code:
#include <amxmodx> #include <fakemeta> #include <hamsandwich> #define OFFSET_TEAM    114 new g_Msg_TeamInfo; public plugin_init() {     RegisterHam(Ham_Spawn, "player", "Forward_Spawn");         g_Msg_TeamInfo = get_user_msgid("TeamInfo"); } public Forward_Spawn(id) {     if(get_user_team(id) != 1)     {         fm_set_user_team(id, 1);     } } fm_set_user_team(index, team) {     set_pdata_int(index, OFFSET_TEAM, team);     dllfunc(DLLFunc_ClientUserInfoChanged, index, engfunc(EngFunc_GetInfoKeyBuffer, index));         message_begin(MSG_ALL, g_Msg_TeamInfo);     write_byte(index);     static Teams[][] =     {         "", // LOL NULL         "TERRORIST",         "CT",         "SPECTATOR"     }     write_string(Teams[team]);     message_end(); }
__________________
O o
/Ż________________________
| IMMA FIRIN' MAH LAZOR!!!
\_ŻŻŻ
Dores is offline
padilha007
Senior Member
Join Date: Jul 2008
Old 01-26-2009 , 12:07   Re: Prevent spawn after roundstart
Reply With Quote #10

no my mod do that. but tnx for all and +K
__________________

padilha007 is offline
Reply



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:45.


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