Raised This Month: $ Target: $400
 0% 

Getting player model


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hip_hop_x
Senior Member
Join Date: Apr 2006
Old 12-26-2007 , 19:56   Getting player model
Reply With Quote #1

Code:
new model[32]
pev(id,pev_model, model, 31)
if(contain(model,"vegeta") != -1){
//my code
}
What's wrong, even if my player model is the vegeta one, the code doesn't detect it . Does pev_model returns the string id?
hip_hop_x is offline
Send a message via MSN to hip_hop_x Send a message via Yahoo to hip_hop_x
Old 12-26-2007, 20:19
Arkshine
This message has been deleted by Arkshine. Reason: nvm
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 12-26-2007 , 20:34   Re: Getting player model
Reply With Quote #2

I believe that it's only for weapons. Not sure.

Anyway, here, cs_get_user_model() converted to FM, you can do something like:

Code:
    #include <amxmodx>     #include <fakemeta>         #define get_user_model(%1,%2,%3) engfunc( EngFunc_InfoKeyValue, engfunc( EngFunc_GetInfoKeyBuffer, %1 ), "model", %2, %3 )     public plugin_init()     {         // ...     }         my_function( id )     {         static sModel[32];         get_user_model( id, sModel, charsmax( sModel ) );                 log_amx( "id = %d | model = '%s'", id, sModel );     }
__________________

Last edited by Arkshine; 12-26-2007 at 20:37.
Arkshine is offline
hip_hop_x
Senior Member
Join Date: Apr 2006
Old 12-27-2007 , 07:15   Re: Getting player model
Reply With Quote #3

thanks allot mate, works now.
hip_hop_x is offline
Send a message via MSN to hip_hop_x Send a message via Yahoo to hip_hop_x
Reply


Thread Tools
Display Modes

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 10:59.


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