AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugin/Gameplay Ideas and Requests (https://forums.alliedmods.net/forumdisplay.php?f=60)
-   -   Change to player's skin on pickup (https://forums.alliedmods.net/showthread.php?t=309072)

Keyinator 07-12-2018 20:55

Change to player's skin on pickup
 
I really can't find a plugin that does it. I tried my best xD (found one but didn't work).
What it needs to do: Change the skin of a weapon on the ground to the player's skin (in his inventory) on pick up.

mug1wara 07-13-2018 08:18

Re: Change to player's skin on pickup
 
I belive GivePlayerItem sets it to the client's skin when given, not sure though.

Keyinator 07-13-2018 10:29

Re: Change to player's skin on pickup
 
I think it doesn't work for weapons that are being picked up

mug1wara 07-13-2018 11:21

Re: Change to player's skin on pickup
 
PHP Code:

#include <sourcemod>
#include <sdktools>

#pragma semicolon 1

public void OnPluginStart()
{
    
HookEvent("item_pickup"Event_Pickup);
}

public 
Action Event_Pickup(Event hEvent, const char[] sNamebool bDontBroadcast)
{
    
int iClient GetClientOfUserId(hEvent.GetInt("userid"));
    
    
char sWeapon[32];
    
    
GetClientWeapon(iClientsWeaponsizeof(sWeapon));
    
    
GivePlayerItem(iClientsWeapon);



mug1wara 07-13-2018 11:21

Re: Change to player's skin on pickup
 
but u need to remove the client's weapon, this is just a sample

brunoronning 07-13-2018 14:35

Re: Change to player's skin on pickup
 
Search.....
https://forums.alliedmods.net/showpo...23&postcount=6

Or direct link to github:
https://github.com/quasemago/WeaponSkinOnEquip

Keyinator 07-14-2018 18:34

Re: Change to player's skin on pickup
 
Quote:

Originally Posted by brunoronning (Post 2603365)

Doesn't work for me.

brunoronning 07-15-2018 07:59

Re: Change to player's skin on pickup
 
Quote:

Originally Posted by Keyinator (Post 2603654)
Doesn't work for me.

New version! it's working for me:
- https://github.com/quasemago/WeaponSkinOnEquip


All times are GMT -4. The time now is 18:17.

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