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

Remove restriction pistol


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
chroma1337
New Member
Join Date: Dec 2020
Old 12-01-2020 , 07:14   Remove restriction pistol
Reply With Quote #1

Hi, i have a question. I have a DR server, and i can't get a pistol when im spawning.
The pistols are not restricted in the DR manager plugin (checked)

casual server.cfg:

mp_ct_default_melee weapon_knife
mp_ct_default_secondary weapon_hkp2000
mp_ct_default_primary ""
mp_t_default_melee weapon_knife
mp_t_default_secondary weapon_hkp2000
chroma1337 is offline
Cruze
Veteran Member
Join Date: May 2017
Old 12-01-2020 , 08:15   Re: Remove restriction pistol
Reply With Quote #2

Some maps strips pistols in round start
__________________
Taking paid private requests! Contact me
Cruze is offline
chroma1337
New Member
Join Date: Dec 2020
Old 12-01-2020 , 08:37   Re: Remove restriction pistol
Reply With Quote #3

Maybe how i can force to give pistol I tried an plugin but when im activating the plugin, server crashes..

https://pastebin.com/usCHGQVu (.sp)

Last edited by chroma1337; 12-01-2020 at 08:56.
chroma1337 is offline
GsiX
gee, six eggs
Join Date: Aug 2012
Location: Land Below The Wind
Old 12-02-2020 , 02:37   Re: Remove restriction pistol
Reply With Quote #4

you forget check client:

PHP Code:
public Action Event_PlayerSpawn(Event event, const char[] namebool dontBroadcast)
{
    
int client GetClientOfUserId(event.GetInt("userid"));
    if( 
client && client <= MaxClients && IsClientInGameclient ))
    {
        if(
g_cEnabled.BoolValue)
        {    
            
GivePlayerItem(client"weapon_usp");
        }
    }

__________________
If i happen to insulted you unintentionally,
it was me and Google Translate who did it.
GsiX is offline
Cruze
Veteran Member
Join Date: May 2017
Old 12-04-2020 , 12:16   Re: Remove restriction pistol
Reply With Quote #5

if above doesn't work ->
PHP Code:
public Action Event_PlayerSpawn(Event event, const char[] namebool dontBroadcast)
{
    
RequestFrame(Frame_PlayerSpawnevent.GetInt("userid"));
}

void Frame_PlayerSpawn(int userid)
{
    
int client;
    if((
client GetClientOfUserId(userid)) == 0)
    {
        return;
    }
    if(!
IsClientInGame(client))
    {
        return;
    }
    if(!
IsPlayerAlive(client))
    {
        return;
    }
    if(
g_cEnabled.BoolValue)
    {    
        
GivePlayerItem(client"weapon_usp");
    }

__________________
Taking paid private requests! Contact me

Last edited by Cruze; 12-04-2020 at 12:17. Reason: Player alive check
Cruze 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 23:02.


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