AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   checking if player had a weapon when the player dies (https://forums.alliedmods.net/showthread.php?t=12233)

Cheap_Suit 04-09-2005 02:04

checking if player had a weapon when the player dies
 
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
        }


XxAvalanchexX 04-09-2005 12:00

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.

Cheap_Suit 04-09-2005 12:45

thanks

btw whats goes here?

register_event("Damage","damage","2=0")

XxAvalanchexX 04-09-2005 15:47

Nothing.


All times are GMT -4. The time now is 09:59.

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