Raised This Month: $ Target: $400
 0% 

JCTF + GunGame


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Spirit_12
Veteran Member
Join Date: Dec 2012
Location: Toronto, CA
Old 12-20-2014 , 02:02   JCTF + GunGame
Reply With Quote #1

I was looking to run JCTF and GunGame mods side by side. What I need to make this more interesting is that flag captures to increase GunGame levels. I read the JCTF api and it's fairly simple. My question here is. What kind of trigger can I use in JCTF, since GunGame has no api.

Is there any way to use amx_gungame_level <target> <level> to your advantage? If that's not going to work, then is there any other way to increase level on flag capture? I know, it's possible in some way or another, as I have seen it on a server.

Links:

Spirit_12 is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 12-20-2014 , 07:48   Re: JCTF + GunGame
Reply With Quote #2

Quote:
Originally Posted by Spirit_12 View Post
Is there any way to use amx_gungame_level <target> <level> to your advantage?
http://amxmodx.org/api/amxmodx/server_cmd
http://amxmodx.org/api/amxmodx/console_cmd
__________________
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
Spirit_12
Veteran Member
Join Date: Dec 2012
Location: Toronto, CA
Old 12-22-2014 , 02:33   Re: JCTF + GunGame
Reply With Quote #3

Thanks for the reply Yami. I have the code, but it won't pin point the person who triggered the event.

PHP Code:
/* id = player who captured the enemy (iFlagTeam) flag */
new cmd[129]
format(cmd,128"amx_gungame_level id +1");
server_cmd(cmd); 
I have tried it with other options for cvar like @ALL, @TERRORIST and @CT, but I need to pin point that specific player, who triggered the event. Upon the event trigger, I get this.

Quote:
Client with that name or userid not found

Last edited by Spirit_12; 12-22-2014 at 02:33.
Spirit_12 is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 12-23-2014 , 11:50   Re: JCTF + GunGame
Reply With Quote #4

You either need to pass the #UserID or the Name of the player
__________________
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
Spirit_12
Veteran Member
Join Date: Dec 2012
Location: Toronto, CA
Old 12-24-2014 , 20:28   Re: JCTF + GunGame
Reply With Quote #5

For some reason the cvar amx_gungame_level won't work with userid. I converted the user index into userid and console still prints the same message.

Quote:
Client with that name or userid not found
Just to double check everything I even tried to do the same thing manually. With that being said, my other option was to use name. Name works fine with the command, but the issue is when we have a name with space.

Example: amx_gungame_level tag name +1

When server sends the command, it treats "tag" "name" as two arguments, when it should consider "tag name" as one and "+1" as the other. How would I be able to fix this? Is there any solution?
Spirit_12 is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 12-25-2014 , 07:00   Re: JCTF + GunGame
Reply With Quote #6

Please show us exactly what you have tried so we can determine the correct way to assist you
__________________
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
Spirit_12
Veteran Member
Join Date: Dec 2012
Location: Toronto, CA
Old 12-25-2014 , 09:41   Re: JCTF + GunGame
Reply With Quote #7

PHP Code:
/* id = player index who captured the enemy (iFlagTeam) flag */ 
            
new name[32]
            
get_user_name(idname31)
            if(
iFlagTeam == 2)
                {
                new 
cmd[129]
                
format(cmd,128"amx_gungame_level %s +1"name);
                
server_cmd(cmd);} 
As you can see, I'm converting the index into player name and then using that in the GunGame plugin command, but the issue is that, if there is a space in your name, then command takes it as 2 arguments, as opposed to 1.
Spirit_12 is offline
breakzuza
Member
Join Date: Feb 2011
Location: Romania
Old 01-10-2015 , 15:32   Re: JCTF + GunGame
Reply With Quote #8

Quote:
Originally Posted by Spirit_12 View Post
PHP Code:
/* id = player index who captured the enemy (iFlagTeam) flag */ 
            
new name[32]
            
get_user_name(idname31)
            if(
iFlagTeam == 2)
                {
                new 
cmd[129]
                
format(cmd,128"amx_gungame_level %s +1"name);
                
server_cmd(cmd);} 
hey....can someone help me with this?..to explain me how to add this on plugin?..i've tryed a lot of things but not worked...plugin dosent compile...
breakzuza is offline
Spirit_12
Veteran Member
Join Date: Dec 2012
Location: Toronto, CA
Old 01-13-2015 , 17:47   Re: JCTF + GunGame
Reply With Quote #9

Quote:
Originally Posted by breakzuza View Post
hey....can someone help me with this?..to explain me how to add this on plugin?..i've tryed a lot of things but not worked...plugin dosent compile...
It won't compile, because its not the whole code. I just posted the section that, I was having issues with. The actual code includes jctf api and some GunGame commands. Its really not that hard to be honest, just try to look into amxmodx documentation and I'm sure you can figure it out.

http://www.amxmodx.org/doc/

Also this method is not that efficient. The only reason why I went with it was because, I wanted to create a sub-plugin that won't require any change to main plugins.
Spirit_12 is offline
breakzuza
Member
Join Date: Feb 2011
Location: Romania
Old 01-16-2015 , 05:44   Re: JCTF + GunGame
Reply With Quote #10

Quote:
Originally Posted by Spirit_12 View Post
It won't compile, because its not the whole code. I just posted the section that, I was having issues with. The actual code includes jctf api and some GunGame commands. Its really not that hard to be honest, just try to look into amxmodx documentation and I'm sure you can figure it out.

http://www.amxmodx.org/doc/

Also this method is not that efficient. The only reason why I went with it was because, I wanted to create a sub-plugin that won't require any change to main plugins.
ok...thx....done..thx for tips

Last edited by breakzuza; 01-16-2015 at 19:37.
breakzuza is offline
Reply


Thread Tools
Display Modes

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 15:26.


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