Raised This Month: $ Target: $400
 0% 

Registering Events?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
laziboi72
Senior Member
Join Date: Aug 2009
Location: deathrun_temple
Old 12-22-2009 , 12:48   Registering Events?
Reply With Quote #1

How do i register event when players respawn or drop their weapons or when a new round starts?
laziboi72 is offline
tuty
Veteran Member
Join Date: Jul 2008
Location: UK
Old 12-22-2009 , 12:51   Re: Registering Events?
Reply With Quote #2

for spawn

RegisterHam( Ham_Spawn, "player", "baconPlayerSpawn", 1 );

for round start

register_logevent( "logevent_round_start", 2, "1=Round_Start" );
__________________
tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 12-22-2009 , 12:52   Re: Registering Events?
Reply With Quote #3

- RegisterHam( Ham_Spawn, "player", "Player_Spawn", 1 );
- register_clcmd( "drop", "Command_PlayerDropWeapon" );
- register_event( "HLTV", "Event_NewRound", "a", "1=0", "2=0" ) ;
__________________
Arkshine is offline
laziboi72
Senior Member
Join Date: Aug 2009
Location: deathrun_temple
Old 12-22-2009 , 12:57   Re: Registering Events?
Reply With Quote #4

Quote:
Originally Posted by Arkshine View Post
- RegisterHam( Ham_Spawn, "player", "Player_Spawn", 1 );
- register_clcmd( "drop", "Command_PlayerDropWeapon" );
- register_event( "HLTV", "Event_NewRound", "a", "1=0", "2=0" ) ;
so for spawning i have to use hamsandwich?
__________________
Taking a break from modding dunno when i will be back

FAIL, RIGHT HERE
laziboi72 is offline
Zombiezzz
Veteran Member
Join Date: Nov 2009
Location: Nov 2009
Old 12-22-2009 , 13:01   Re: Registering Events?
Reply With Quote #5

yup
#include <hamsandwich>
__________________
Zombiezzz is offline
laziboi72
Senior Member
Join Date: Aug 2009
Location: deathrun_temple
Old 12-22-2009 , 13:05   Re: Registering Events?
Reply With Quote #6

thanks all +k when i am able to again
(i've been giving so much +k cuz everyone helps me =)
__________________
Taking a break from modding dunno when i will be back

FAIL, RIGHT HERE
laziboi72 is offline
tuty
Veteran Member
Join Date: Jul 2008
Location: UK
Old 12-22-2009 , 15:54   Re: Registering Events?
Reply With Quote #7

Quote:
Originally Posted by laziboi72 View Post
so for spawning i have to use hamsandwich?

no... use cheesesandwich

__________________
tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
laziboi72
Senior Member
Join Date: Aug 2009
Location: deathrun_temple
Old 12-22-2009 , 16:22   Re: Registering Events?
Reply With Quote #8

Quote:
Originally Posted by tuty View Post
no... use cheesesandwich

lol funny...
i meant like instead of ham i use register_event(resetHUD...
__________________
Taking a break from modding dunno when i will be back

FAIL, RIGHT HERE
laziboi72 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-22-2009 , 19:07   Re: Registering Events?
Reply With Quote #9

Quote:
Originally Posted by laziboi72 View Post
i meant like instead of ham i use register_event(resetHUD...
http://forums.alliedmods.net/showthread.php?t=42159

ResetHUD is technically not the same as spawning.
__________________
fysiks 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 04:13.


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