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

[CSGO] Weapon quipment


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ZASTRELIS
Veteran Member
Join Date: Nov 2010
Location: Siberia, Irkutsk
Old 11-21-2015 , 03:27   [CSGO] Weapon quipment
Reply With Quote #1

Why I can't give to player HKP2000 when I send command GivePlayerItem( client, "weapon_hkp2000" ); from server to the player which replaced HKP2000 to UPS Silencer in his inventory?

Code:
GivePlayerItem( client, "weapon_hkp2000" );

=>

Always USP Silencer..
ZASTRELIS is offline
Franc1sco
Veteran Member
Join Date: Oct 2010
Location: Spain (Madrid)
Old 11-21-2015 , 05:02   Re: [CSGO] Weapon quipment
Reply With Quote #2

Maybe because you have installed this https://forums.alliedmods.net/showthread.php?t=236199

I made a plugin for fix that issue https://forums.alliedmods.net/showpo...8&postcount=86
__________________
Veteran Coder -> Activity channel
Coding on CS2 and taking paid and free jobs.

Contact: Steam, Telegram or discord ( franug ).

You like my work? +Rep in my steam profile comments or donate.

Franc1sco is offline
Send a message via MSN to Franc1sco
ZASTRELIS
Veteran Member
Join Date: Nov 2010
Location: Siberia, Irkutsk
Old 11-21-2015 , 05:15   Re: [CSGO] Weapon quipment
Reply With Quote #3

Quote:
Originally Posted by Franc1sco View Post
Maybe because you have installed this https://forums.alliedmods.net/showthread.php?t=236199

I made a plugin for fix that issue https://forums.alliedmods.net/showpo...8&postcount=86
no, I wrote my easy vip system and find problem with this..
ZASTRELIS is offline
ZASTRELIS
Veteran Member
Join Date: Nov 2010
Location: Siberia, Irkutsk
Old 11-21-2015 , 05:28   Re: [CSGO] Weapon quipment
Reply With Quote #4

I tried func CreateEntityByName but don't sure that it's a correct weapon because after player equiped it I can't get weapon index

ScreenShot

WTF
Attached Images
File Type: jpg 2015-11-21_00006.jpg (94.6 KB, 498 views)

Last edited by ZASTRELIS; 11-21-2015 at 05:45.
ZASTRELIS is offline
Kailo
Senior Member
Join Date: Sep 2014
Location: Moscow, Russia
Old 11-21-2015 , 08:12   Re: [CSGO] Weapon quipment
Reply With Quote #5

This happen because you chouse USP-S in your inventory in this slot. If you'll change to P2000, you'll P2000.
Kailo is offline
ZASTRELIS
Veteran Member
Join Date: Nov 2010
Location: Siberia, Irkutsk
Old 11-21-2015 , 08:32   Re: [CSGO] Weapon quipment
Reply With Quote #6

Quote:
Originally Posted by Kailo View Post
This happen because you chouse USP-S in your inventory in this slot. If you'll change to P2000, you'll P2000.
How I can give p2000 with no choose in inventory?
ZASTRELIS is offline
ZASTRELIS
Veteran Member
Join Date: Nov 2010
Location: Siberia, Irkutsk
Old 11-21-2015 , 09:07   Re: [CSGO] Weapon quipment
Reply With Quote #7

Changed. Topic closed.

Spoiler
Attached Images
File Type: jpg 2015-11-21_00007.jpg (83.3 KB, 440 views)
ZASTRELIS is offline
SM9
Veteran Member
Join Date: Sep 2013
Location: United Kingdom
Old 11-22-2015 , 22:15   Re: [CSGO] Weapon quipment
Reply With Quote #8

You would need to fake the m_iTeamNum netprop before GivePlayerItem then change it back after for example giving a p2k to a CT with usp in loadout means you would set teamnum to Terrorist then switch back after to make the csgo inventory ignore his loadout. I am writing a CSGOItems plugin similar to TF2Items although not sure if I would be allowed to release it.

Excuse lack of help as I'm writing this from my phone, ill post an example when I wake up.

Last edited by SM9; 11-22-2015 at 22:19.
SM9 is offline
Chokitu
Senior Member
Join Date: Oct 2013
Old 11-23-2015 , 05:01   Re: [CSGO] Weapon quipment
Reply With Quote #9

You can just check if player is on ct and drop an USP
Chokitu is offline
Send a message via Skype™ to Chokitu
SM9
Veteran Member
Join Date: Sep 2013
Location: United Kingdom
Old 11-23-2015 , 17:43   Re: [CSGO] Weapon quipment
Reply With Quote #10

This should do the trick.

PHP Code:
GivePlayerItem2(iClient"weapon_usp_silencer"); 
PHP Code:
stock void GivePlayerItem2(int iClient, const char[] chItem)
{
    
int iTeam GetClientTeam(iClient);
    
    switch(
iTeam) {
        case 
2: {
            
SetEntProp(iClientProp_Send"m_iTeamNum"3);
        }
        case 
3: {
            
SetEntProp(iClientProp_Send"m_iTeamNum"2);
        }
    }
    
    
GivePlayerItem(iClientchItem);
    
SetEntProp(iClientProp_Send"m_iTeamNum"iTeam);

SM9 is offline
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 05:04.


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