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

[Request] VIP Privilages


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 04-05-2020 , 23:48   [Request] VIP Privilages
Reply With Quote #1

Hello Guys..
I Made VIP Privilages plugin for give vips [ health and 3 bombs]
But i want to add vipspeed and make this plugins for CT only

PHP Code:
VipSpeed register_cvar("vs_vip_speed""400"); 
Default Plugin:

PHP Code:
#include <amxmodx>
#include <fun>
#include <colorchat>
#include < hamsandwich >
#include <cstrike>
#include <engine>
#include <fakemeta>
#include <fakemeta_util>


#define VIP-ACC ADMIN_LEVEL_H

new VIPhealth

public 
plugin_init() 
{

    
register_plugin"VIP Privilage""1.0""(K![L]leR-ND)" )
    
RegisterHam(Ham_Spawn"player""Privilage"1)    

    
VIPhealth register_cvar("health_VIP""150"


}

public 
Privilage(id)
{
        if( 
get_user_flagsid ) & VIP-ACC 
        {
        
ColorChat(idGREEN"^1[ ^4GameOver ^1] ^3You got^1 150HP ^3-^1 Full nade Pack")
        }

        
set_user_health(idget_pcvar_num(VIPhealth))
        
give_item(id"weapon_hegrenade")
        
give_item(id"weapon_flashbang")
        
give_item(id"weapon_flashbang")
        
give_item(id"weapon_smokegrenade")
        

I made this but it didn't worked , Please helP ... and how to make this for ct only
PHP Code:
#include <amxmodx>
#include <fun>
#include <colorchat>
#include < hamsandwich >
#include <cstrike>
#include <engine>
#include <fakemeta>
#include <fakemeta_util>


#define VIP-ACC ADMIN_LEVEL_H

new VIPhealth,VIPspeed

public 
plugin_init() 
{

    
register_plugin"VIP Privilage""1.0""MrAbdoO");
    
RegisterHam(Ham_Spawn"player""Privilage"1)    

    
VIPhealth register_cvar("health_VIP""150")
    
VipSpeed register_cvar("speed_VIP""400")


}

public 
Privilage(id)
{
        if( 
get_user_flagsid ) & VIP-ACC 
        {
        
ColorChat(idGREEN"^1[ ^4GameOver ^1] ^3You got^1 150HP ^3-^1 Full nade Pack")
        }

        
set_user_health(idget_pcvar_num(VIPhealth))
    
set_user_maxspeed(idget_pcvar_float(VipSpeed));
        
give_item(id"weapon_hegrenade")
        
give_item(id"weapon_flashbang")
        
give_item(id"weapon_flashbang")
        
give_item(id"weapon_smokegrenade")
        


Last edited by Supremache; 04-05-2020 at 23:50.
Supremache is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 04-06-2020 , 09:02   Re: [Request] VIP Privilages
Reply With Quote #2

Help please......
Supremache is offline
alferd
Veteran Member
Join Date: Dec 2019
Location: Iran is Always Eternal
Old 04-06-2020 , 09:37   Re: [Request] VIP Privilages
Reply With Quote #3

PHP Code:
#include <amxmodx>
#include <fun>
#include <colorchat>
#include < hamsandwich >
#include <cstrike>
#include <engine>
#include <fakemeta>
#include <fakemeta_util>


#define VIPACC ADMIN_LEVEL_H

new VIPhealth,VIPspeed

public 
plugin_init() 
{

    
register_plugin"VIP Privilage""1.0""MrAbdoO");
    
RegisterHam(Ham_Spawn"player""Privilage"1)    

    
VIPhealth register_cvar("health_VIP""150")
    
VipSpeed register_cvar("speed_VIP""400")


}

public 
Privilage(id)
{
        if( 
get_user_flagsid ) & VIPACC 
        {
        
ColorChat(idGREEN"^1[ ^4GameOver ^1] ^3You got^1 150HP ^3-^1 Full nade Pack")

        
set_user_health(idget_pcvar_num(VIPhealth))
        
set_user_maxspeed(idget_pcvar_float(VipSpeed))
        
give_item(id"weapon_hegrenade")
        
give_item(id"weapon_flashbang")
        
give_item(id"weapon_flashbang")
        
give_item(id"weapon_smokegrenade")
}

alferd is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 04-06-2020 , 09:44   Re: [Request] VIP Privilages
Reply With Quote #4

@alferd - copy/pasting the code and changing "-" to "_" isn't going to make things better. Don't post useless comments if you can't help.

PHP Code:
#include <amxmodx>
#include <colorchat>
#include <cstrike>
#include <fun>
#include <hamsandwich>

#define VIP-ACC ADMIN_LEVEL_H

new VIPhealthVIPspeed

public plugin_init() 
{
    
register_plugin"VIP Privilage""1.0""MrAbdoO")
    
register_event("CurWeapon""OnWeaponChange""be""1=1")
    
RegisterHam(Ham_Spawn"player""Privilage"1)

    
VIPhealth register_cvar("health_VIP""150")
    
VIPspeed register_cvar("speed_VIP""400")
}

public 
OnWeaponChange(id)
{
    if(
get_user_flags(id) & VIP-ACC)
    {
        
set_user_maxspeed(idget_pcvar_float(VIPspeed))
    }
}

public 
Privilage(id)
{
    if(
get_user_flags(id) & VIP-ACC && cs_get_user_team(id) == CS_TEAM_CT
    {
        
ColorChat(idGREEN"^1[ ^4GameOver ^1] ^3You got^1 150HP ^3-^1 Full nade Pack")
    }

    
set_user_health(idget_pcvar_num(VIPhealth))
    
give_item(id"weapon_hegrenade")
    
give_item(id"weapon_flashbang")
    
give_item(id"weapon_flashbang")
    
give_item(id"weapon_smokegrenade")

__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 04-06-2020 , 11:26   Re: [Request] VIP Privilages
Reply With Quote #5

Quote:
Originally Posted by OciXCrom View Post
@alferd - copy/pasting the code and changing "-" to "_" isn't going to make things better. Don't post useless comments if you can't help.

PHP Code:
#include <amxmodx>
#include <colorchat>
#include <cstrike>
#include <fun>
#include <hamsandwich>

#define VIP-ACC ADMIN_LEVEL_H

new VIPhealthVIPspeed

public plugin_init() 
{
    
register_plugin"VIP Privilage""1.0""MrAbdoO")
    
register_event("CurWeapon""OnWeaponChange""be""1=1")
    
RegisterHam(Ham_Spawn"player""Privilage"1)

    
VIPhealth register_cvar("health_VIP""150")
    
VIPspeed register_cvar("speed_VIP""400")
}

public 
OnWeaponChange(id)
{
    if(
get_user_flags(id) & VIP-ACC)
    {
        
set_user_maxspeed(idget_pcvar_float(VIPspeed))
    }
}

public 
Privilage(id)
{
    if(
get_user_flags(id) & VIP-ACC && cs_get_user_team(id) == CS_TEAM_CT
    {
        
ColorChat(idGREEN"^1[ ^4GameOver ^1] ^3You got^1 150HP ^3-^1 Full nade Pack")
    }

    
set_user_health(idget_pcvar_num(VIPhealth))
    
give_item(id"weapon_hegrenade")
    
give_item(id"weapon_flashbang")
    
give_item(id"weapon_flashbang")
    
give_item(id"weapon_smokegrenade")

Thanks bro , But why vips getten only 320 speed not 400 , Do you know why ?
Supremache is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 04-06-2020 , 11:33   Re: [Request] VIP Privilages
Reply With Quote #6

I Made edit for plugin and i added gravity + armor But i got [1wrong]
Can you fix it please

PHP Code:
#include <amxmodx>
#include <colorchat>
#include <cstrike>
#include <fun>
#include <hamsandwich>

#define VIP-ACC ADMIN_LEVEL_H

new VIPhealthVIParmorVIPspeed

public plugin_init() 
{
    
register_plugin"VIP Privilage""1.0""MrAbdoO")
    
register_event("CurWeapon""OnWeaponChange""be""1=1")
    
RegisterHam(Ham_Spawn"player""Privilage"1)

    
VIPhealth register_cvar("health_VIP""150")
    
VIParmor register_cvar("armor_VIP""150")
    
VIPspeed register_cvar("speed_VIP""400")
}

public 
OnWeaponChange(id)
{
    if(
get_user_flags(id) & VIP-ACC)
    {
        
set_user_maxspeed(idget_pcvar_float(VIPspeed))
    }
}

public 
Privilage(id)
{
    if(
get_user_flags(id) & VIP-ACC && cs_get_user_team(id) == CS_TEAM_CT
    {
        
ColorChat(idGREEN"^1[ ^4GameOver ^1] ^3You got^1 150HP ^3-^1 150Armor ^3-^1 Gravity ^3-^1 Speed ^3-^1 Full nade Pack"
   
    
set_user_health(idget_pcvar_num(VIPhealth))
    
set_user_gravity(idget_user_gravity(id) - 0.5)
    
set_user_armor(idget_pcvar_num(VIParmor))
    
give_item(id"weapon_hegrenade")
    
give_item(id"weapon_flashbang")
    
give_item(id"weapon_flashbang")
    
give_item(id"weapon_smokegrenade")
   }

Supremache is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 04-06-2020 , 14:03   Re: [Request] VIP Privilages
Reply With Quote #7

1. How did you measure that it's 320?
2. What is wrong?
__________________

Last edited by OciXCrom; 04-06-2020 at 14:03.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
+ARUKARI-
AlliedModders Donor
Join Date: Jul 2004
Location: Japan
Old 04-06-2020 , 14:15   Re: [Request] VIP Privilages
Reply With Quote #8

please not use hypen
PHP Code:
// #define VIP-ACC ADMIN_LEVEL_H
#define VIP_ACC ADMIN_LEVEL_H 
Add a armor.
PHP Code:
cs_set_user_armor(idget_pcvar_num(VIParmor), CS_ARMOR_VESTHELM); 
keep max speed.(use fakemeta_util)
PHP Code:
    RegisterHam(Ham_CS_Player_ResetMaxSpeed"player""KeepMaxSpeed",     1); 
PHP Code:
public KeepMaxSpeed(id)
{
    if(
get_user_flags(id) & VIP_ACC)
    {
        if (
fm_get_user_maxspeed(id) < get_pcvar_float(VIPspeed))
            
fm_set_user_maxspeed(idget_pcvar_float(VIPspeed));
    }
    
    return 
HAM_IGNORED;

__________________
GitHub
SteamWishlist

六四天安門事件

Last edited by +ARUKARI-; 04-06-2020 at 14:22.
+ARUKARI- is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 04-06-2020 , 14:20   Re: [Request] VIP Privilages
Reply With Quote #9

@ARUKARI - that won't work on AMXX < 1.9. Also, why fakemeta_util?
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 04-06-2020 , 14:28   Re: [Request] VIP Privilages
Reply With Quote #10

Quote:
Originally Posted by OciXCrom View Post
1. How did you measure that it's 320?
2. What is wrong?
I downloaded speedmonturhud plug-in for testing speed
And I saw it 320 not 400 and I changed it from 400 to 700 also have same speed 320
Supremache 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 18:21.


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