Raised This Month: $ Target: $400
 0% 

[SOLVED] Which one is called first?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
yokomo
Surprise Ascot!
Join Date: May 2010
Location: Malaysia
Old 04-25-2011 , 14:46   [SOLVED] Which one is called first?
Reply With Quote #1

Hi,
I write a plugin that using:
* HLTV event
* Ham_spawn forward

This is my code:
PHP Code:
public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_event("HLTV""event_round_start""a""1=0""2=0")
    
    
RegisterHam(Ham_Spawn"player""fw_PlayerSpawn_Post"1)

    
register_forward(FM_ClientUserInfoChanged"fw_ClientUserInfoChanged")
    
    
g_maxplayers get_maxplayers()

Ok i just want to know which one is called first? "event_round_start" or "fw_PlayerSpawn_Post". So confuse LOL.
__________________
Team-MMG CS1.6 Servers:
✅ MultiMod -- 103.179.44.152:27016
✅ Zombie Plague -- 103.179.44.152:27015
✅ Zombie Escape -- 103.179.44.152:27017
✅ Klassik Kombat -- 103.179.44.152:27018
✅ Boss-Battle -- 103.179.44.152:27019

Last edited by yokomo; 05-13-2012 at 04:21. Reason: Solved
yokomo is offline
SonicSonedit
Veteran Member
Join Date: Nov 2008
Location: Silent Hill
Old 04-25-2011 , 14:54   Re: [HELP] Which one is called first?
Reply With Quote #2

Use this
PHP Code:
public event_round_start()
    
server_print("event_round_start")

public 
fw_PlayerSpawn_Post(id)
    
server_print("fw_PlayerSpawn_Post for player %d"id
and then see by yourself.
__________________

SonicSonedit is offline
yokomo
Surprise Ascot!
Join Date: May 2010
Location: Malaysia
Old 04-25-2011 , 15:06   Re: [HELP] Which one is called first?
Reply With Quote #3

Quote:
Originally Posted by SonicSonedit View Post
Use this
PHP Code:
public event_round_start()
    
server_print("event_round_start")

public 
fw_PlayerSpawn_Post(id)
    
server_print("fw_PlayerSpawn_Post for player %d"id
and then see by yourself.
server_print mean? it print in console or?
__________________
Team-MMG CS1.6 Servers:
✅ MultiMod -- 103.179.44.152:27016
✅ Zombie Plague -- 103.179.44.152:27015
✅ Zombie Escape -- 103.179.44.152:27017
✅ Klassik Kombat -- 103.179.44.152:27018
✅ Boss-Battle -- 103.179.44.152:27019
yokomo is offline
Neeeeeeeeeel.-
Some Guy Yellin'
Join Date: Jul 2010
Location: Argentina
Old 04-25-2011 , 15:17   Re: [HELP] Which one is called first?
Reply With Quote #4

Put a print in each fuction and then you see which one is called fist, as sonic said...
__________________
Neeeeeeeeeel.- is offline
Send a message via Skype™ to Neeeeeeeeeel.-
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-25-2011 , 15:54   Re: [HELP] Which one is called first?
Reply With Quote #5

HLTV message is sent first, then all players are spawned.

See cs-sdk function CHalfLifeMultiplay::RestartRound()
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
yokomo
Surprise Ascot!
Join Date: May 2010
Location: Malaysia
Old 04-25-2011 , 16:05   Re: [HELP] Which one is called first?
Reply With Quote #6

Quote:
Originally Posted by ConnorMcLeod View Post
HLTV message is sent first, then all players are spawned.

See cs-sdk function CHalfLifeMultiplay::RestartRound()
Nice, finally found a good link to learn. Thanks Connor.
__________________
Team-MMG CS1.6 Servers:
✅ MultiMod -- 103.179.44.152:27016
✅ Zombie Plague -- 103.179.44.152:27015
✅ Zombie Escape -- 103.179.44.152:27017
✅ Klassik Kombat -- 103.179.44.152:27018
✅ Boss-Battle -- 103.179.44.152:27019
yokomo is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-25-2011 , 16:05   Re: [HELP] Which one is called first?
Reply With Quote #7

Quote:
Originally Posted by yokomo View Post
Nice, finally found a good link to learn. Thanks Connor.
You can thanks arkshine who is spenting hours on decompiling !!
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 04-25-2011 , 16:32   Re: [HELP] Which one is called first?
Reply With Quote #8

Quote:
Originally Posted by ConnorMcLeod View Post
You can thanks arkshine who is spenting hours on decompiling !!
yet he doesnt update cs-sdk with fresh codes
__________________
xPaw is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-25-2011 , 16:38   Re: [HELP] Which one is called first?
Reply With Quote #9

I have fresh codes, I need to commit, but I've started to review functions one by one, checking, adding offset used, etc. And I don't want much to commit the mess i've started. I will update ASAP.
__________________
Arkshine is offline
Reply


Thread Tools
Display Modes

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 19:51.


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