Raised This Month: $51 Target: $400
 12% 

Need small help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
code
Member
Join Date: Nov 2011
Old 03-10-2014 , 16:33   Need small help
Reply With Quote #1

Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <colorchat>

#define PLUGIN "I'm Simon"
#define VERSION "1.0"
#define AUTHOR "SpeeD"

new bool:Simon
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /simon","simoncmd")
register_logevent("ResetSimon",2,"1=Round_End ")
register_event("TextMsg", "ResetSimon", "a", "2&#Game_C", "2&#Game_w")
}

public simoncmd(id)
{
if(get_user_team(id) != 2)
ColorChat(id,GREEN,"You are not allowed to be Simon.")
if(!Simon)
{
new name[32]
get_user_name(id,name,31)
set_hudmessage( 0, 100, 255, 1.0, 0.05, 0, 0.1, 1.0, 0.1, 0.1, 4 );
show_hudmessage( 0, "%s - Is now simon.", name );
Simon = true
return PLUGIN_HANDLED;
}
else
ColorChat(id,GREEN,"There is already Simon!")
return PLUGIN_HANDLED
}

public ResetSimon()
Simon = false
Hud message disappears how i can make so it stays until next round

Please help i dont ask much

Last edited by YamiKaitou; 03-10-2014 at 17:50.
code is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 03-10-2014 , 16:42   Re: Need small help
Reply With Quote #2

Increase the holdtime (parameter 8)
__________________
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).

Last edited by YamiKaitou; 03-10-2014 at 17:49.
YamiKaitou is offline
code
Member
Join Date: Nov 2011
Old 03-10-2014 , 16:58   Re: Need small help
Reply With Quote #3

Thanks now works perfect
code is offline
code
Member
Join Date: Nov 2011
Old 03-10-2014 , 17:54   Re: Need small help
Reply With Quote #4

another problem came up i have another plugin who uses command /simon now the second plugin dosent detect it. Is there a way so /simon command actiwates two plugins at same time?

i use jailbreak mod
code is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 03-10-2014 , 18:01   Re: Need small help
Reply With Quote #5

You need to return either PLUGIN_HANDLED_MAIN (prevents chat message from displaying) or PLUGIN_CONTINUE (displays chat message) in both plugins in the command handle function
__________________
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
code
Member
Join Date: Nov 2011
Old 03-10-2014 , 18:02   Re: Need small help
Reply With Quote #6

Thanks
code is offline
code
Member
Join Date: Nov 2011
Old 03-11-2014 , 09:05   Re: Need small help
Reply With Quote #7

Another problem when Simon dies he won't disappear from HUD how to fix that
Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <colorchat>

#define PLUGIN "Simon"
#define VERSION "1.0"
#define AUTHOR "Frego"

new bool:Simon
public plugin_init() {
    register_plugin(PLUGIN, VERSION, AUTHOR)
    register_clcmd("say /simon","simoncmd")
    register_logevent("ResetSimon",2,"1=Round_End")
    register_event("TextMsg", "ResetSimon", "a", "2&#Game_C", "2&#Game_w")
}

public simoncmd(id)
{
    if(get_user_team(id) != 2)
        ColorChat(id,GREEN,"You are T ;).")
    if(!Simon)
    {
        new name[32]
        get_user_name(id,name,31)
        set_hudmessage( 255, 204, 0, 1.0, 0.05, 0, 0.1, 900.0, 0.1, 0.1, 4 );
        show_hudmessage( 0, "%s - is Simon.", name );
        Simon = true
    }
    else
        ColorChat(id,GREEN,"There is already simon!")
    return PLUGIN_HANDLED_MAIN
}

public ResetSimon()
    Simon = false

Last edited by code; 03-11-2014 at 09:08.
code is offline
connoisseur
Senior Member
Join Date: Jan 2012
Old 03-11-2014 , 10:07   Re: Need small help
Reply With Quote #8

You'll have to code in the condition for when the simon dies. Right now it will display the HUD for full 900 seconds no matter what.
You can display a message on the same channel to make the previous message disappear.

Also, try to make your topic headings descriptive.

Last edited by connoisseur; 03-11-2014 at 10:12.
connoisseur is offline
code
Member
Join Date: Nov 2011
Old 03-12-2014 , 17:41   Re: Need small help
Reply With Quote #9

Nop it displays Hud until round restart. But after death it wont disapear .
if name is d... then goto s which is in the beginning but i dont know how to write it wright.
Probably im stupid and i dont know anything about c because now i'm learning pascal and qbasic so help me out afther 4 years i will help you

Last edited by code; 03-12-2014 at 17:42.
code 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 15:42.


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