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

Solved Simple Script Fix....


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
D3XT3R
AlliedModders Donor
Join Date: Nov 2016
Location: Lithuania, Bomb A (Kauna
Old 03-25-2017 , 14:46   Simple Script Fix....
Reply With Quote #1

Hey Could some one make this vip menu can vip use it 1 time per round :d and thanx

PHP Code:
#include < amxmodx > 
#include < amxmisc > 
#include < fakemeta > 
#include < fun > 
#include < xs > 

#define ADMIN_VIP        ADMIN_LEVEL_H 

#define TELEPORT_INTERVAL     20.0 //float 
#define TASK_REMOVEGODMODE 23131313

static const PLUGIN[ ]        = "VIP Furien"
static const 
VERSION[ ]         = "1.0"

static const 
szTag[ ]        = "[Furien-Ultimate]"

new 
g_bNoRecoil33 ];
new 
g_bGodMode33 
new 
g_bHpAdded33 ]

public 
plugin_init( )  

    
register_pluginPLUGINVERSION"Unhask" 
    
    
register_event"ResetHUD""SpawnPlayer""be" 
    
    
register_clcmd"say""SayChatAnswer" 
    
    
register_forwardFM_PlayerPreThink"fwdPlayerPreThink" )


public 
client_disconnect(id)
{
    if(
task_exists(id+TASK_REMOVEGODMODE))
        
remove_task(id+TASK_REMOVEGODMODE)
}

public 
SpawnPlayerid 

    
g_bGodModeid ] = false 
    g_bHpAdded
id ] = false 
    g_bNoRecoil
id ] = false 


public 
SayChatAnswerid 

    new 
szSaid132 
    
    
read_argsszSaidsizeof szSaid ) - 
    
remove_quotesszSaid 
    
    if ( 
containiszSaid"/vipmenu" ) ) 
    { 
        if ( 
is_user_aliveid ) && get_user_flagsid ) & ADMIN_VIP 
        { 
            
ShowMenuVIPid 
        } 
    } 


public 
ShowMenuVIPid 

    new 
szMenu 
    
    
switch ( get_user_teamid ) ) 
    { 
        case 
1
        { 
            
szMenu menu_create"\rFurien \yVIP Menu""iContent" 
            
            
menu_additemszMenu"\w255HP & 255AP",     "1" 
            
menu_additemszMenu"\wHe Grenade",     "2" 
            
menu_additemszMenu"\wGodMode",     "3" 
            
menu_additemszMenu"\wNoRecoil",     "4" 
        } 
        
        case 
2
        { 
            
szMenu menu_create"\rAnti-Furien \yVIP Menu""iContent" 
            
            
menu_additemszMenu"\w255HP & 255AP",     "1" 
            
menu_additemszMenu"\wHe Grenade",     "2" 
            
menu_additemszMenu"\wGodMode",     "3" 
            
menu_additemszMenu"\wNoRecoil",     "4" 
        } 
    } 
    
    
menu_displayidszMenu
    
    return 



public 
iContentidszMenuItem 

    if ( 
Item == MENU_EXIT 
    { 
        
menu_destroyszMenu 
        return 

    

    
    new 
iData], szName32 
    new 
iAccessiCallback 
    
    menu_item_getinfo
szMenuItemiAccessiDatasizeof iData ) - 1szNamesizeof szName ) - 1iCallback 
    
    new 
iKeys str_to_numiData 
    
    switch( 
get_user_teamid ) ) 
    { 
        case 
1
        { 
            switch( 
iKeys 
            { 
                case 
1
                { 
                    if(!
g_bHpAdded[id]) 
                    { 
                        
set_user_healthid255 
                        
set_user_armorid255 
                        
                        
g_bHpAdded[id] = true
                        print_colorchat
id"!t%s !yYou choose !g255HP & 255AP"szTag )
                    }
                    else
                    {
                        
print_colorchatid"!t%s !yYou already has take !g255HP & 255AP"szTag )
                    }
                } 
                
                case 
2
                { 
                    if ( 
user_has_weaponidCSW_HEGRENADE ) ) 
                    { 
                        
print_colorchatid"!t%s !yYou already has !gHE"szTag 
                    } 
                    else 
                    { 
                        
give_itemid"weapon_hegrenade" 
                        
print_colorchatid"!t%s !yYou choose !gHE"szTag 
                    }
                } 
                
                case 
3
                { 
                    if(!
g_bGodMode[id])
                    {
                        
g_bGodModeid ]  = true 
                        
                        set_pev
(id,pev_takedamage,DAMAGE_NO)
                        
set_task(20.0,"RemoveGodM",id+TASK_REMOVEGODMODE)
                        
                        
print_colorchatid"!t%s !yYou are 20Sec !gGodMode"szTag )
                    }
                    else
                    {
                        
print_colorchatid"!t%s !yYou have no !gGodMode"szTag 
                    }
                } 
                
                case 
4:
                {
                    
g_bNoRecoilid ]  = true;
                    
                    
print_colorchatid"!t%s !yYou choose !gNoRecoil"szTag 
                } 
            } 
        } 
        
        case 
2
        { 
            switch( 
iKeys 
            { 
                case 
1
                { 
                    if(!
g_bHpAdded[id]) 
                    { 
                        
set_user_healthid255 
                        
set_user_armorid255 
                        
                        
g_bHpAdded[id] = true
                        print_colorchat
id"!t%s !yYou choose !g255HP & 255AP"szTag )
                    }
                    else
                    {
                        
print_colorchatid"!t%s !yYou already has take !g255HP & 255AP"szTag )
                    }
                } 
                
                case 
2
                { 
                    if ( 
user_has_weaponidCSW_HEGRENADE ) ) 
                    { 
                        
print_colorchatid"!t%s !yYou already has !gHE"szTag 
                    } 
                    else 
                    { 
                        
give_itemid"weapon_hegrenade" 
                        
print_colorchatid"!t%s !yYou choose !gHE"szTag 
                    }
                } 
                
                case 
3
                { 
                    if(!
g_bGodMode[id])
                    {
                        
g_bGodModeid ]  = true 
                        
                        set_pev
(id,pev_takedamage,DAMAGE_NO)
                        
set_task(20.0,"RemoveGodM",id+TASK_REMOVEGODMODE)
                        
                        
print_colorchatid"!t%s !yYou choose !gGodMode"szTag )
                    }
                    else
                    {
                        
print_colorchatid"!t%s !yYou have no !gGodMode"szTag 
                    }
                } 
                
                case 
4:
                {
                    
g_bNoRecoilid ]  = true;
                    
                    
print_colorchatid"!t%s !yYou choose !gNoRecoil"szTag 
                } 
            } 
        } 
    }
    return 
0


public 
RemoveGodM(id)
{
    
id -= TASK_REMOVEGODMODE
    
    g_bGodMode
[id] = false
    set_pev
(id,pev_takedamage,DAMAGE_AIM)
}

public 
fwdPlayerPreThinkid 

    if( !
is_user_aliveid ) && !g_bNoRecoilid ] ) 
        return 
1
    
    if ( 
get_user_flagsid ) & ADMIN_VIP 
    { 
        
set_pevidpev_punchangle, { 0.0,0.0,0.0 } ); 
    } 
    
    return 
0


stock print_colorchat(const id, const input[], any:...) 

    new 
count 1players[32]; 
    static 
msg[191]; 
    
vformat(msg,190,input,3); 
    
replace_all(msg,190,"!g","^4");// green txt 
    
replace_all(msg,190,"!y","^1");// orange txt 
    
replace_all(msg,190,"!t","^3");// team txt 
    
replace_all(msg,190,"!w","^0");// team txt 
    
if (idplayers[0] = id; else get_players(players,count,"ch"); 
    for (new 
i=0;i<count;i++) 
        if (
is_user_connected(players[i])) 
    { 
        
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SayText"), _players[i]); 
        
write_byte(players[i]); 
        
write_string(msg); 
        
message_end(); 
    } 

/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1036\\ f0\\ fs16 \n\\ par }
*/ 
__________________

Last edited by D3XT3R; 03-27-2017 at 08:47.
D3XT3R is offline
Send a message via Skype™ to D3XT3R
wickedd
Veteran Member
Join Date: Nov 2009
Old 03-25-2017 , 15:36   Re: Simple Script Fix....
Reply With Quote #2

Search the forum
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.

Last edited by wickedd; 03-25-2017 at 15:37.
wickedd is offline
Adomaz1
Senior Member
Join Date: Feb 2014
Old 03-25-2017 , 15:42   Re: Simple Script Fix....
Reply With Quote #3

off-topic buy why do you use the print_colorchat stock?
Adomaz1 is offline
D3XT3R
AlliedModders Donor
Join Date: Nov 2016
Location: Lithuania, Bomb A (Kauna
Old 03-25-2017 , 16:07   Re: Simple Script Fix....
Reply With Quote #4

Quote:
Originally Posted by Adomaz1 View Post
off-topic buy why do you use the print_colorchat stock?
is that has problem? its not a nonsteam thing to cant be support for it
__________________
D3XT3R is offline
Send a message via Skype™ to D3XT3R
Adomaz1
Senior Member
Join Date: Feb 2014
Old 03-25-2017 , 17:30   Re: Simple Script Fix....
Reply With Quote #5

Quote:
Originally Posted by D3XT3R View Post
is that has problem? its not a nonsteam thing to cant be support for it
why use a stock if you can use client_print_color which is already in amxx 1.8.3
Adomaz1 is offline
D3XT3R
AlliedModders Donor
Join Date: Nov 2016
Location: Lithuania, Bomb A (Kauna
Old 03-25-2017 , 17:39   Re: Simple Script Fix....
Reply With Quote #6

i dont has problem with hook i want fix that to be used one round only...
__________________

Last edited by D3XT3R; 03-25-2017 at 17:40.
D3XT3R is offline
Send a message via Skype™ to D3XT3R
Adomaz1
Senior Member
Join Date: Feb 2014
Old 03-26-2017 , 06:05   Re: Simple Script Fix....
Reply With Quote #7

Code:
new bool:one_time

public plugin_init() register_event("HLTV", "NewRound", "a", "1=0", "2=0")  

public NewRound() one_time = false

public code()
{
    one_time = true
    
    if(one_time) client_print(id, print_chat, "This Coammnd Can Used 1 Time A Round"
    
    else if(!one_time)
    {
    // Your Code
    }
}
found this on the forums in 10 seconds.

Last edited by Adomaz1; 03-26-2017 at 06:05.
Adomaz1 is offline
D3XT3R
AlliedModders Donor
Join Date: Nov 2016
Location: Lithuania, Bomb A (Kauna
Old 03-26-2017 , 17:03   Re: Simple Script Fix....
Reply With Quote #8

Quote:
Originally Posted by Adomaz1 View Post
Code:
new bool:one_time

public plugin_init() register_event("HLTV", "NewRound", "a", "1=0", "2=0")  

public NewRound() one_time = false

public code()
{
    one_time = true
    
    if(one_time) client_print(id, print_chat, "This Coammnd Can Used 1 Time A Round"
    
    else if(!one_time)
    {
    // Your Code
    }
}
found this on the forums in 10 seconds.
i added it and its when say /vipmenu its in begin say this command can used 1 time..... complet yours help by posting full req plugin mean add it to me ))
__________________
D3XT3R is offline
Send a message via Skype™ to D3XT3R
wickedd
Veteran Member
Join Date: Nov 2009
Old 03-26-2017 , 18:12   Re: Simple Script Fix....
Reply With Quote #9

Damn! Try to figure it out for yourself or search the damn forum. This is not the request forum, plus this has been discussed many time before.
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
D3XT3R
AlliedModders Donor
Join Date: Nov 2016
Location: Lithuania, Bomb A (Kauna
Old 03-27-2017 , 08:47   Re: Simple Script Fix....
Reply With Quote #10

Quote:
Originally Posted by wickedd View Post
Damn! Try to figure it out for yourself or search the damn forum. This is not the request forum, plus this has been discussed many time before.
thanx dude but i'm confuised why you call this forum with damn its should call it mamn of amxmodx
__________________
D3XT3R is offline
Send a message via Skype™ to D3XT3R
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 17:26.


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