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

[CS:GO] i can't get my "vip start items" plugin to work (Please help me)


Post New Thread Reply   
 
Thread Tools Display Modes
condolent
AlliedModders Donor
Join Date: Jan 2016
Location: gc_sLocation;
Old 09-25-2017 , 04:23   Re: [CS:GO] i can't get my "vip start items" plugin to work (Please help me)
Reply With Quote #11

Quote:
Originally Posted by NATroutter View Post
i'm an idiot i don't now know how to use it
can you write some example for me
To use CheckCommandAccess by flags you can do this:

PHP Code:
if(CheckCommandAccess(id""ADMFLAG_BANtrue)) return true
You can read more about it here. For example, why did I set "" on the second parameter? Simply because since it's empty, it will not look for a command at all and will instead only check the flag specified when the last parameter is set to true.
__________________
condolent is offline
Papero
Veteran Member
Join Date: Aug 2016
Location: Italy
Old 09-25-2017 , 08:16   Re: [CS:GO] i can't get my "vip start items" plugin to work (Please help me)
Reply With Quote #12

To use bitflags try somethink like this
PHP Code:
    if ((GetUserFlagBits(client) & flags == flags) || (GetUserFlagBits(client) & ADMFLAG_ROOT))
    {
        
//client has the flag
    
}
    
//client doesnt have the tag 
For multiple flags support check this: https://github.com/Hexer10/VipMenu-B...ks.inc#L49-L69
__________________
My Plugins
SPCode


Steam: hexer504
Telegram: Hexah
Discord: Hexah#6903

If you like my work you can donate here!
Papero is offline
shanapu
Veteran Member
Join Date: Apr 2015
Location: .de
Old 09-25-2017 , 10:44   Re: [CS:GO] i can't get my "vip start items" plugin to work (Please help me)
Reply With Quote #13

I done something simliar long time ago with zeus...
maybe it will be helpful.
https://github.com/shanapu/VIP-zeus-...r/zeusspawn.sp
__________________
coding & free software
shanapu is offline
PyKw
Junior Member
Join Date: Jan 2012
Old 09-25-2017 , 10:53   Re: [CS:GO] i can't get my "vip start items" plugin to work (Please help me)
Reply With Quote #14

Try this:
Code:
#include <sourcemod>
#include <sdktools>

public Plugin myinfo = 
{
    name = "Vip Items",
    author = "Picutz",
    description = "Items for VIPs",
    version = "1.0",
    url = "https://forums.alliedmods.net/"
}

public void OnPluginStart() 
{
    HookEvent("player_spawn", OnPlayerSpawn);
}

public Action OnPlayerSpawn(Event event, const char[] name, bool dontBroadcast)
{
	new client = GetClientOfUserId(GetEventInt(event, "userid"));
	new VipFlag = ReadFlagString("a");

	if ((GetUserFlagBits(client) & VipFlag) == VipFlag)
        {
                GivePlayerItem(client, "weapon_tagrenade");
                GivePlayerItem(client, "weapon_healthshot");
        }
}

Last edited by PyKw; 09-25-2017 at 10:57.
PyKw 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 09:29.


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