Raised This Month: $ Target: $400
 0% 

Detect World Model


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DavidJr
Senior Member
Join Date: Apr 2012
Old 04-21-2014 , 23:33   Detect World Model
Reply With Quote #1

How to get the string of the world model when picking up? I tried but it didn't work.

PHP Code:
public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR);
    
    
register_forward(FM_SetModel"fw_SetModel");
    
    
RegisterHam(Ham_Touch"weaponbox""fwd_Touch");
}

public 
fw_SetModel(iEntszModel)
{
    
engfunc(EngFunc_SetModel"models/w_ak47.mdl");
}

public 
fwd_Touch(iEntiIndex)
{
    new 
szModel[64]
    
pev(iEntpev_modelszModelsizeof szModel);
    
    
client_print(0print_chat"LOL %s"szModel); // Only print LOL, the model isn't detected

__________________
What are you looking for here?
DavidJr 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 11:13.


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