Raised This Month: $ Target: $400
 0% 

[L4D2] Model name to Item name


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
kahdeg
Junior Member
Join Date: Oct 2021
Old 03-16-2024 , 06:57   [L4D2] Model name to Item name
Reply With Quote #1

Hi, i was trying to make a simple pinging plugins.
Here is my code that do the pointing and getting the pointed at Entity:
PHP Code:
    int iEntAtEndPos;
    
iEntAtEndPos GetClientAimTarget(clientfalse);
    if(
iEntAtEndPos != -1){
        
char sEntAtEndPosName2[128];
        
GetEntPropString(iEntAtEndPosProp_Data"m_ModelName"sEntAtEndPosName2128 );
        
PrintToChat(client"test %d %s"iEntAtEndPossEntAtEndPosName2);
    } 
the output is:
Code:
test 3 models/survivors/survivor_mechanic.mdl
test 687 models/w_models/weapons/w_pistol_B.mdl
test 608 models/weapons/melee/w_fireaxe.mdl
test 608 models/weapons/melee/w_fireaxe.mdl
test 2 models/survivors/survivor_producer.mdl
test 3 models/survivors/survivor_mechanic.mdl
test 686 models/w_models/weapons/w_eq_Medkit.mdl
test 608 models/weapons/melee/w_fireaxe.mdl
test 609 models/weapons/melee/w_fireaxe.mdl
test 687 models/w_models/weapons/w_pistol_B.mdl
test 781 models/weapons/melee/w_crowbar.mdl
test 4 models/survivors/survivor_coach.mdl
test 415 models/props_urban/plastic_chair001.mdl
I want to map and filter only stuff like weapon and medkit, pill, ... things that player can pickup.
Is there a list of model or some standard function that do that?

Last edited by kahdeg; 03-16-2024 at 06:58.
kahdeg is offline
 



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:24.


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