Raised This Month: $ Target: $400
 0% 

randomly or team wise


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SHIELD755
Veteran Member
Join Date: Feb 2018
Location: FROM MARVEL STUDIO
Old 11-13-2018 , 03:23   randomly or team wise
Reply With Quote #1

hii every body

is it possible to send two command randomly or by team wise
for an example i have a hero plugin and when hero come it buy a gun or send a clientcommand "buy_gun" and he buy a gun and i does not have the soruce code of that hero so i am thinking that how to make a public function in a new plugin which has register_clcmd(buy_gun) so that it send the two client command randomly or by team wise in which the other two plugin will have cmd like clientcmd: buy_gun1 and buy_gun2

i just tried this
PHP Code:
public plugin_init()
{
   
register_plugin(PLUGINVERSIONAUTHOR)
   
register_clcmd("buygun""buygun")
}

public 
buy_gun(id)
}
            switch(
iTeam){
                case 
1:
                {
                    
client_cmd(i"buy_gun1")
                    
                }
                case 
2:
                {
                    
client_cmd("buy_gun2")


i think all clear may be
__________________
SED LYF !!!

Last edited by SHIELD755; 11-13-2018 at 03:29.
SHIELD755 is offline
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: White Plains
Old 11-13-2018 , 05:41   Re: randomly or team wise
Reply With Quote #2

Correct me if I'm wrong: You have a plugin and don't own the source code of it. With two commands registered, meant to give user a specific weapon, you want those commands merged into one simple command where depending on player's team, you call one of those commands.
Also when you say randomly do you want the first player who writes buygun in console has the opportunity to get the weapon on his team?, or just pickup a random player at the end of freezetime and give 2 players from both teams custom weapons.
__________________
Relaxing is offline
SHIELD755
Veteran Member
Join Date: Feb 2018
Location: FROM MARVEL STUDIO
Old 11-13-2018 , 06:08   Re: randomly or team wise
Reply With Quote #3

you got the point relaxing
i am saying if it is possible to give randomly than ok or if it is possible to give team wise than also great
__________________
SED LYF !!!
SHIELD755 is offline
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: White Plains
Old 11-13-2018 , 06:32   Re: randomly or team wise
Reply With Quote #4

Try amxxdump that plugin and try to guess the function's name of that command. Then if successful you can block both those buy gun 1 and 2 from being executed. Calling the function saves more effort other than what you're requesting.
__________________
Relaxing is offline
SHIELD755
Veteran Member
Join Date: Feb 2018
Location: FROM MARVEL STUDIO
Old 11-13-2018 , 06:47   Re: randomly or team wise
Reply With Quote #5

sound relaxing
__________________
SED LYF !!!
SHIELD755 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 07:30.


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