Raised This Month: $32 Target: $400
 8% 

EquipPlayerWeapon shows no knife


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MindeLT
Senior Member
Join Date: Dec 2010
Location: Lithuania
Old 01-02-2012 , 19:30   EquipPlayerWeapon shows no knife
Reply With Quote #1

Could it be, that EquipPlayerWeapon dissapears weapon?

I'm using Rembo Style. If player is rembo, plugin restricts: pickup, rebuy, buy events.

On spawn, all weapons is removed from player.
I'm using timer.

PHP Code:
public Action:Rembo_Style(Handle:timerany:client)
{
    if (!
IsClientInGame(client) || !IsPlayerAlive(client)) return Plugin_Stop;
    
    
SetEntProp(clientProp_Send"m_iHealth"300);
    new 
ginklas GetPlayerWeaponSlot(client0),
        
pistol GetPlayerWeaponSlot(client1),
        
knife GetPlayerWeaponSlot(client2);
    if (
ginklas != -1)
    {
        
RemovePlayerItem(clientginklas);
        
RemoveEdict(ginklas);
    }
    if (
pistol != -1)
    {
        
RemovePlayerItem(clientpistol);
        
RemoveEdict(pistol);
    }
    
EquipPlayerWeapon(clientknife);
    return 
Plugin_Stop;

__________________
MindeLT is offline
Send a message via Skype™ to MindeLT
Brrdy
Senior Member
Join Date: Feb 2015
Old 02-27-2015 , 15:08   Re: EquipPlayerWeapon shows no knife
Reply With Quote #2

Quote:
Originally Posted by MindeLT View Post
Could it be, that EquipPlayerWeapon dissapears weapon?

I'm using Rembo Style. If player is rembo, plugin restricts: pickup, rebuy, buy events.

On spawn, all weapons is removed from player.
I'm using timer.
You didn't define "knife" on EquipPlayerWeapon

Here is fixed code that should work

Spoiler
Brrdy 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 03:24.


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