Raised This Month: $ Target: $400
 0% 

checking if player had a weapon when the player dies


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Cheap_Suit
Veteran Member
Join Date: May 2004
Old 04-09-2005 , 02:04   checking if player had a weapon when the player dies
Reply With Quote #1

how would I check if a player had this weapon when the player died??

i dont know if this will work

Code:
public death_event() {
	
	for(new id = 0; id < get_maxplayers(); id++) {

	new userswep = user_has_weapon(id,userswep)

	if(userswep == CSW_MP5) {
                //codes
	}
__________________
HDD fried, failed to backup files. Sorry folks, just don't have free time anymore. This is goodbye.
Cheap_Suit is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 04-09-2005 , 12:00  
Reply With Quote #2

By the time DeathMsg is called all of their weapons and items are gone, so you can't use get_user_weapon or anything. You have to register the Damage event, get their health, and then see if it is smaller than or equal to 0.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Cheap_Suit
Veteran Member
Join Date: May 2004
Old 04-09-2005 , 12:45  
Reply With Quote #3

thanks

btw whats goes here?

register_event("Damage","damage","2=0")
__________________
HDD fried, failed to backup files. Sorry folks, just don't have free time anymore. This is goodbye.
Cheap_Suit is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 04-09-2005 , 15:47  
Reply With Quote #4

Nothing.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX 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 09:59.


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