Raised This Month: $ Target: $400
 0% 

/ungrav


Post New Thread Reply   
 
Thread Tools Display Modes
KingCommentor
Senior Member
Join Date: Jan 2008
Location: Floridaaaa
Old 08-02-2008 , 19:13   Re: /ungrav
Reply With Quote #11

I know thats what I'm sayin, but he posted this code he says makes it do that when it actually already does.

And can anyone answer my question on how to make a scrolling message?

Quote:
Originally Posted by grimvh2 View Post
maybe instead of making them say /ungrav take away gravity after the round ends

PHP Code:
#include <amxmodx> 
#include <amxmisc> 
#include <cstrike> 
#include <fakemeta> 
#define PLUGIN "TESTING" 
#define VERSION "1.0" 
#define AUTHOR "kingcommentor" 
new price 
new enabled 
new g_MsgSync 
public plugin_init() 

 
register_plugin(PLUGINVERSIONAUTHOR
 
register_clcmd("say /grav","GravOn")
 
register_logevent("EndRound",2,"0=World triggered""1=Round_Draw""1=Round_End");
 
price register_cvar("amx_grav_price""1000"
 
enabled register_cvar("amx_grav_enabled""1"
 
g_MsgSync CreateHudSyncObj() 

public 
GravOn(id

 new 
money cs_get_user_money(id
 new 
tprice get_pcvar_num(price); 
 if (
get_pcvar_num(enabled) == 1
 { 
  if (
money tprice
  { 
   
client_print(id,print_chat,"You don't have enough money! Gravity currently costs %d!" tprice
  } 
  else 
  { 
   
set_hudmessage(01272550.300.2906.0,15.0
   
ShowSyncHudMsg(idg_MsgSync,"Your gravity is now 400 untill the round ends"
   
set_pev(idpev_gravity0.50
   
cs_set_user_money(idmoney-tprice
  } 
 } 

 
/* Round Ends */
public EndRound()
{
    new 
players[32], pnum
    get_players
(playerspnum)
    for( new 
0pnumi++ )
    {
        
set_pev(players[i], pev_gravity1.0)
    }    

__________________
+Karma is appreciated! |Be PROUD, leave your name!
KingCommentor is offline
Send a message via AIM to KingCommentor
iHaxor.Stan
BANNED
Join Date: Jul 2007
Old 08-02-2008 , 19:35   Re: /ungrav
Reply With Quote #12

I'm on a laptop right now but I have that code somewhere stored on my desktop
I'll get it to you in like 20 minutes when I have access to desktop (very soon)
iHaxor.Stan is offline
iHaxor.Stan
BANNED
Join Date: Jul 2007
Old 08-02-2008 , 19:51   Re: /ungrav
Reply With Quote #13

Try this, I don't know if it will work..
Under all your #defines put:
Code:
#define TASK_ID 1337
put this also where your "new"'s are:
Code:
new msg_time
new Plugin_Tag[] = "Gravity";
in public plugin_init, put this in:
Code:
msg_time = register_cvar("grav_msg_time", "60")
then put this somewhere:
Code:
public client_putinserver(id)
{
        set_task(get_pcvar_float(msg_time), "Advertise_Msg", TASK_ID)
}
then put this somewhere else:
Code:
public Advertise_Msg(id)
{
client_print(id, print_chat, "[%s] MESSAGE HERE", Plugin_Tag)
   
    set_task(get_pcvar_float(msg_time), "Advertise_Msg", TASK_ID)
    return PLUGIN_CONTINUE
}
Replace MESSAGE HERE with whatever, but leave the [%s]

Try it out!
The default on that is set to 60 seconds as shown in the cvar but you can change that to however many seconds you want
iHaxor.Stan is offline
KingCommentor
Senior Member
Join Date: Jan 2008
Location: Floridaaaa
Old 08-02-2008 , 20:57   Re: /ungrav
Reply With Quote #14

Ok I will try it out and get back to ya here soon.
__________________
+Karma is appreciated! |Be PROUD, leave your name!
KingCommentor is offline
Send a message via AIM to KingCommentor
iHaxor.Stan
BANNED
Join Date: Jul 2007
Old 08-02-2008 , 22:05   Re: /ungrav
Reply With Quote #15

ok tell me how it works out
iHaxor.Stan is offline
grimvh2
Veteran Member
Join Date: Nov 2007
Location: Fishdot Nation
Old 08-03-2008 , 07:04   Re: /ungrav
Reply With Quote #16

Who doe you mean with a scrolling message?

You mean like an advertise that shows like evry 100 seconds ?
__________________
I am out of order!
grimvh2 is offline
KingCommentor
Senior Member
Join Date: Jan 2008
Location: Floridaaaa
Old 08-03-2008 , 15:58   Re: /ungrav
Reply With Quote #17

Well, I would like both .. I dont know if the one above works yet .. I've yet to test it .. been busy.

Also who would you do that advertisement one?
Where every 60seconds or so donw where the client chat is a messaage shows up telling about the plugin ?
__________________
+Karma is appreciated! |Be PROUD, leave your name!
KingCommentor is offline
Send a message via AIM to KingCommentor
iHaxor.Stan
BANNED
Join Date: Jul 2007
Old 08-03-2008 , 17:52   Re: /ungrav
Reply With Quote #18

Yes it shows in chat every 60 seconds but you can change the amount of time
iHaxor.Stan is offline
grimvh2
Veteran Member
Join Date: Nov 2007
Location: Fishdot Nation
Old 08-04-2008 , 07:04   Re: /ungrav
Reply With Quote #19

PHP Code:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN "New Plugin"
#define VERSION "1.0"
#define AUTHOR "Grim"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
set_task(60.0"show_mes")
}

public 
show_mes()
{
    
client_print(0print_chat"say /grav to buy low gravity for 1 round")
    
set_task(60.0"show_mes")

__________________
I am out of order!
grimvh2 is offline
iHaxor.Stan
BANNED
Join Date: Jul 2007
Old 08-04-2008 , 09:02   Re: /ungrav
Reply With Quote #20

His probably works better
iHaxor.Stan 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 11:14.


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