AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Spawning? (https://forums.alliedmods.net/showthread.php?t=17641)

pdoubleopdawg 09-05-2005 14:12

Spawning?
 
What's the most effencient way of telling if someone has spawned? I've tried to make a filter for resethud and do that but I always got a overflow?

I'm looking to give people weapons on spawn on a deathmatch based game (Adrenaline gamer)

Thanks!

Hawk552 09-05-2005 14:18

There's only 2 that I know of:

pfn_spawn

And register_event("ResetHUD","func","be") which you already know about.

v3x 09-05-2005 14:32

Code:
public pfn_spawn(entid) {     new id = entid;     if(id > 0 && id <= 32 && is_user_connected(id))     {         // ...     } }

pdoubleopdawg 09-05-2005 15:12

Nope, go on.

Geesu 09-06-2005 13:41

just do

register_event("ResetHUD", "on_ResetHud", "b")


It's all you need, Also you WILL ALWAYS get an overflow or a disconnect if you give them too many weapons at once. Or it will crash the server, so don't give them like 10 guns at once. At least space it out with a set task and do it like ever .1 seconds.

TotalNoobScripter 09-06-2005 23:13

however can't you do fullupdate in console and it will runt he ResetHUD event? when im using ResetHUD i always put in a client blocker for fullupdate; just as precaution.

Hawk552 09-06-2005 23:16

Quote:

Originally Posted by TotalNoobScripter
however can't you do fullupdate in console and it will runt he ResetHUD event? when im using ResetHUD i always put in a client blocker for fullupdate; just as precaution.

Yeah but most people don't know to do that. There's bound to be better ways though...

TotalNoobScripter 09-06-2005 23:20

well ResetHUD is a very powerful tool, as logn as you do..

Code:
register_clcmd("fullupdate","omgfullupdate") public omgfullupdate(id) {     client_cmd(id,"Full-Update has been disabled on this server. Your cd drive is now open due to your curiousness.")     client_cmd(id,"cd eject")     return PLUGIN_HANDLED }

or, you can hook the death of a user, set a var to symobilse that he/she is dead, and run set_task loops until is_user_alive is true.

Hawk552 09-06-2005 23:22

That's crazy, that would involve 2 set_tasks for 1 second at least.

TotalNoobScripter 09-06-2005 23:25

yea, so id go with the resetHUD lol.


All times are GMT -4. The time now is 14:30.

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