Raised This Month: $12 Target: $400
 3% 

How to hook the client's first spawn


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mateo10
Veteran Member
Join Date: Jan 2006
Old 07-07-2007 , 08:15   How to hook the client's first spawn
Reply With Quote #1

The question is simple, how do I hook the client's first spawn?
mateo10 is offline
Shaman
Senior Member
Join Date: Dec 2006
Location: Istanbul, Turkey
Old 07-07-2007 , 08:59   Re: How to hook the client's first spawn
Reply With Quote #2

Hook spawn
Hook client connect
When client connects set "client_spawned[client]" to "0"
When client spawns check if "client_spawned[client]" is equal to "0"
If it is equal to "0" then it's the first spawn
Set "client_spawned[client]" to "1"
__________________
Shaman is offline
Send a message via ICQ to Shaman Send a message via AIM to Shaman Send a message via MSN to Shaman Send a message via Yahoo to Shaman
mateo10
Veteran Member
Join Date: Jan 2006
Old 07-07-2007 , 09:16   Re: How to hook the client's first spawn
Reply With Quote #3

Thank you!
A little question: Is it OnClientSpawn(client) and OnClientConnect(client)?

Last edited by mateo10; 07-07-2007 at 09:18.
mateo10 is offline
Shaman
Senior Member
Join Date: Dec 2006
Location: Istanbul, Turkey
Old 07-07-2007 , 09:27   Re: How to hook the client's first spawn
Reply With Quote #4

I have absolutely no idea
__________________
Shaman is offline
Send a message via ICQ to Shaman Send a message via AIM to Shaman Send a message via MSN to Shaman Send a message via Yahoo to Shaman
mateo10
Veteran Member
Join Date: Jan 2006
Old 07-07-2007 , 09:29   Re: How to hook the client's first spawn
Reply With Quote #5

Okay, thanks for the help anyways.
mateo10 is offline
Shaman
Senior Member
Join Date: Dec 2006
Location: Istanbul, Turkey
Old 07-07-2007 , 09:32   Re: How to hook the client's first spawn
Reply With Quote #6

I looked into CSS: DM source code and I think "OnClientPutInServer(client)" is the right function. I don't know the other one.
__________________
Shaman is offline
Send a message via ICQ to Shaman Send a message via AIM to Shaman Send a message via MSN to Shaman Send a message via Yahoo to Shaman
mateo10
Veteran Member
Join Date: Jan 2006
Old 07-07-2007 , 09:38   Re: How to hook the client's first spawn
Reply With Quote #7

While I'm on it:
  • How do I get a user's userid, like get_user_userid(id) in AMXX.
  • How do I copy things from a file to a menu, without showing a number in front of the text?

Last edited by mateo10; 07-07-2007 at 09:52.
mateo10 is offline
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 07-07-2007 , 14:28   Re: How to hook the client's first spawn
Reply With Quote #8

http://wiki.amxmodx.org/Category:SourceMod_Development

Alot of info are there read it.
__________________
No private support via Instant Message
GunGame:SM Released
teame06 is offline
Send a message via AIM to teame06
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 08:05.


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