AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   get user model (https://forums.alliedmods.net/showthread.php?t=214950)

cstrike37 05-01-2013 18:43

get user model
 
I've been searching for an hour on this and can't finds anything.
So my question is how do you get the user's model on death?

Example:
If the user model is SAS then if he dies, a custom death sound will play.

YamiKaitou 05-01-2013 19:16

Re: get user model
 
Simply use get_user_model in the killed event

cstrike37 05-01-2013 19:33

Re: get user model
 
/del

YamiKaitou 05-01-2013 19:35

Re: get user model
 
You never assign model a value

cstrike37 05-01-2013 19:43

Re: get user model
 
Can you give me an example?

YamiKaitou 05-01-2013 19:52

Re: get user model
 
Code:

public Ham_Killed_Post(victim, attacker)
{
    new model[32];
    get_user_model(victim, model, charsmax(model));
   
    if (equali(model, "sas"))
        // User died while using the SAS model
}


cstrike37 05-01-2013 19:53

Re: get user model
 
Alright thanks! ^__^

cstrike37 05-01-2013 20:50

Re: get user model
 
/del

YamiKaitou 05-01-2013 21:14

Re: get user model
 
equal returns 1 or 0, not True or False

cstrike37 05-01-2013 21:20

Re: get user model
 
it worked! Ty so much!!


All times are GMT -4. The time now is 10:47.

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