This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

set left/right hand


Post New Thread Reply   
 
Thread Tools Display Modes
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 08-17-2012 , 17:41   Re: set left/right hand
Reply With Quote #11

Quote:
Originally Posted by YamiKaitou View Post
You do not delete the 15 second timer when they select an option.
This still exists
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
tcPane
Senior Member
Join Date: Sep 2010
Old 08-17-2012 , 17:47   Re: set left/right hand
Reply With Quote #12

default hand - with this I mean:
when player start cs and he sets right hand( that is default hand ). And when round end set left hand and at new round set default hand
tcPane is offline
pokemonmaster
princess milk
Join Date: Nov 2010
Location: Somewhere in this world
Old 08-17-2012 , 21:04   Re: set left/right hand
Reply With Quote #13

Quote:
Originally Posted by tcPane View Post
default hand - with this I mean:
when player start cs and he sets right hand( that is default hand ). And when round end set left hand and at new round set default hand
Here:
PHP Code:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Auto Hand switch"
#define VERSION "1.0"
#define AUTHOR "Khalid"

/*#define TASKID1        2000
#define TASKID2        2032*/

new Agreed[33] = 0

new gKeys = (MENU_KEY_0|MENU_KEY_1|MENU_KEY_2)

//new right_hand = 1

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_event("TeamInfo""eTeam_Join""b")
    
register_menucmd(register_menuid("This server requires to change weapon view model to right/left hand each round end!^nDo you agree?"), gKeys"menu_handler")
    
register_logevent("eRoundEnd"2"1=Round_End")
    
register_event("HLTV""eNewRound""ae""1=0""2=0")
}

public 
eTeam_Join(id)
{
    
set_task(15.0"show_menu_to_user"id)
}

public 
show_menu_to_user(id)        // So it won't be slow hacking ...
{
    new 
menu[256]
    
formatex(menucharsmax(menu), "This server requires to change weapon view model to right/left hand each round end!^nDo you agree?^n1. Yes, I agree^n 2. No, I don't agree \r[You will be kicked]")
    
show_menu(idgKeysmenu15)
    
set_task(15.0"kick_user"id)        // Kick him if he didn't choose
    
return PLUGIN_CONTINUE
}

public 
kick_user(id)
{
    
//new id = TASK - TASKID1
    
if(Agreed[id] == 1)
        return 
PLUGIN_HANDLED
    server_cmd
("kick #%d ^"You must agree to continue playing here!^""get_user_userid(id))
    return 
PLUGIN_HANDLED
}

public 
client_disconnect(id)
{
    
Agreed[id] = 0
    
    
if(task_exists(id))
        
remove_task(id)
    
    
/*if(task_exists(id + TASKID2))
        remove_task(id + TASKID2)*/
}

public 
menu_handler(idkey)
{
    if(
key == 0)
    {
        
Agreed[id] = 1
        client_print
(idprint_chat"You have agreed!")
        
//set_task(5.0, "client_cvar", TASKID2 + id,_,_, "b")
    
}
    
    else if(
key == 1)
        
server_cmd("kick #%d ^"You must agree to continue playing here!^""get_user_userid(id))
}

public 
eNewRound()
{
    new 
players[32], countplayer
    get_players
(playerscount)
    
    for(new 
icounti++)
    {
        
player players[i]
        
client_cmd(player"cl_righthand 1")
    }
}

public 
eRoundEnd()
{
    new 
players[32], countplayer
    
    get_players
(playerscount)
    
/*for(new i; i < count; i++)
    {
        player = players[i]
        if(right_hand == 1)
        {
            if(Agreed[player] == 1)
                client_cmd(player, "cl_righthand 1")
            right_hand = 0
        }
        
        else if(right_hand == 0)
        {
            if(Agreed[player] == 1)
                client_cmd(player, "cl_righthand 0")
            right_hand = 0
        }
    }*/
    
    
for(new iicounti++)
    {
        
player players[i]
        
client_cmd(player"cl_righthand 0")
    }
}

/*public client_cvar(TASK2)
{
    new id = TASK2 - TASKID2
    query_client_cvar(id, "cl_righthand", "client_cvar2")
}

public client_cvar2(id, cvar[], value[])
{
    new numvalue = str_to_num(value)
    
    if( right_hand != numvalue )
        client_cmd(id, "cl_righthand %d", numvalue)
    
    return PLUGIN_HANDLED
}*/ 
__________________
اَشْهَدُ اَنْ لَّآ اِلٰهَ اِلَّا اللہُ وَحْدَه لَا شَرِيْكَ لَه وَ اَشْهَدُ اَنَّ مُحَمَّدًا عَبْدُه وَرَسُوْلُه
No longer active in AMXX. Sorry.

Last edited by pokemonmaster; 08-17-2012 at 21:07.
pokemonmaster 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 19:36.


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