Raised This Month: $51 Target: $400
 12% 

help? Save dropped weapon


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
felipemilralze
Senior Member
Join Date: Jul 2011
Location: Brazil
Old 05-06-2017 , 19:09   help? Save dropped weapon
Reply With Quote #1

The weapon model shows when falling, but when someone picks up the weapon, the model becomes standard.
I also wanted if I was with standard gun did not show the custom model on the floor.

PHP Code:
public fw_SetModel(entitymodel[])
{
    if(!
is_valid_ent(entity)) 
    return 
FMRES_IGNORED
    
    
if(!equali(model"models/w_m4a1.mdl")) 
    return 
FMRES_IGNORED
    
    
new className[33]
    
entity_get_string(entityEV_SZ_classnameclassName32)
    
    
// dropped weapons
    
if(equal(className"weaponbox"))
    {
        
entity_set_model(entity"models/m_armas/w_m_armas_m4a1.mdl")
        return 
FMRES_SUPERCEDE
    
}
    
    return 
FMRES_IGNORED


Last edited by felipemilralze; 05-06-2017 at 19:19.
felipemilralze is offline
Send a message via MSN to felipemilralze Send a message via Skype™ to felipemilralze
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 05-06-2017 , 19:23   Re: help? Save dropped weapon
Reply With Quote #2

I have no idea what are you talking , but to save weapon dropped you can register an clcmd ("drop") hook and then save it in an 2D array

MyArray[Index][WeaponIndex] = Droped = TRUE ? FALSE... etc.

Insert in the 2d array the CSW_ weapon id with true/false and then check for it.
__________________
Project: Among Us
Craxor is offline
Send a message via ICQ to Craxor
felipemilralze
Senior Member
Join Date: Jul 2011
Location: Brazil
Old 05-06-2017 , 20:28   Re: help? Save dropped weapon
Reply With Quote #3

Does not work
felipemilralze is offline
Send a message via MSN to felipemilralze Send a message via Skype™ to felipemilralze
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 05-07-2017 , 04:47   Re: help? Save dropped weapon
Reply With Quote #4

Show what you have done.
__________________
Project: Among Us
Craxor is offline
Send a message via ICQ to Craxor
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 05-07-2017 , 10:15   Re: help? Save dropped weapon
Reply With Quote #5

Use Ham_Item_Deploy for Model changing or whatever you're trying to do.
__________________
edon1337 is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 05-07-2017 , 10:34   Re: help? Save dropped weapon
Reply With Quote #6

No whatever, Ham_Item_Deploy doesn't set/support w_ models.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
felipemilralze
Senior Member
Join Date: Jul 2011
Location: Brazil
Old 05-07-2017 , 11:56   Re: help? Save dropped weapon
Reply With Quote #7

If i drop a gun the other players would have to get it, so how could I save a fallen weapon on the floor?
felipemilralze is offline
Send a message via MSN to felipemilralze Send a message via Skype™ to felipemilralze
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 05-07-2017 , 12:07   Re: help? Save dropped weapon
Reply With Quote #8

Quote:
Originally Posted by felipemilralze View Post
If i drop a gun the other players would have to get it, so how could I save a fallen weapon on the floor?
Are you drunk? Read my reply.
__________________
Project: Among Us
Craxor is offline
Send a message via ICQ to Craxor
felipemilralze
Senior Member
Join Date: Jul 2011
Location: Brazil
Old 05-07-2017 , 12:27   Re: help? Save dropped weapon
Reply With Quote #9

PHP Code:
register_clcmd("drop""dropped")

public 
dropped(id)
{
    
skinsselected[id][SKIN_M4A1] = !skinsselected[id][SKIN_M4A1] ? true false 
    skinsselected
[id][SKIN_AK47] = !skinsselected[id][SKIN_AK47] ? true false
    skinsselected
[id][SKIN_DEAGLE] = !skinsselected[id][SKIN_DEAGLE] ? true false

Does it work?

Last edited by felipemilralze; 05-07-2017 at 13:05.
felipemilralze is offline
Send a message via MSN to felipemilralze Send a message via Skype™ to felipemilralze
felipemilralze
Senior Member
Join Date: Jul 2011
Location: Brazil
Old 05-07-2017 , 12:43   Re: help? Save dropped weapon
Reply With Quote #10

Quote:
Originally Posted by Craxor View Post
Are you drunk? Read my reply.
It works only if I get again models it changes

Last edited by felipemilralze; 05-07-2017 at 13:06.
felipemilralze is offline
Send a message via MSN to felipemilralze Send a message via Skype™ to felipemilralze
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 10:03.


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