Raised This Month: $ Target: $400
 0% 

Ad.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
terrum
AlliedModders Donor
Join Date: Apr 2006
Location: United Kingdom
Old 02-25-2007 , 12:23   Ad.
Reply With Quote #1

Can someone help me with my plugin im making called "Crashing Carz". I just need a quick code what advertises a command saying "Use /car_crash to get into your cool car" every 5/10 minutes. Thanks.

+karma and your name on my credits will be done. Thanks!
__________________
Thanks,
Terrum.


terrum is offline
Send a message via AIM to terrum Send a message via MSN to terrum Send a message via Skype™ to terrum
SAMURAI16
BANNED
Join Date: Sep 2006
Old 02-25-2007 , 13:38   Re: Ad.
Reply With Quote #2

->
Code:
#include <amxmodx>


public plugin_init() {
    register_plugin("","","");
    
    set_task(1.0,"advert");
}

public advert()
{
    new value = random_num(300,360)
    
    client_print(0,print_chat,"Use /car_crash to get into your cool car")
    
    set_task(float(value),"advert")
}
SAMURAI16 is offline
Send a message via MSN to SAMURAI16
terrum
AlliedModders Donor
Join Date: Apr 2006
Location: United Kingdom
Old 02-25-2007 , 13:52   Re: Ad.
Reply With Quote #3

Quote:
Originally Posted by SAMURAI16 View Post
->
Code:
#include <amxmodx>


public plugin_init() {
    register_plugin("","","");
    
    set_task(1.0,"advert");
}

public advert()
{
    new value = random_num(300,360)
    
    client_print(0,print_chat,"Use /car_crash to get into your cool car")
    
    set_task(float(value),"advert")
}
actually i might just have this one, does it just show a message every 300-360 seconds saying /car_crash etc (not hud) ?
__________________
Thanks,
Terrum.


terrum is offline
Send a message via AIM to terrum Send a message via MSN to terrum Send a message via Skype™ to terrum
FormulaZero
BANNED
Join Date: Feb 2007
Location: Sector 7G
Old 02-25-2007 , 13:39   Re: Ad.
Reply With Quote #4

Here, this might help to, this will display it once they enter the server:

PHP Code:
public client_putinserver(id)
{
    
    
set_task(3.0"welcome"id)
}

public 
welcome(id)
{
    new 
name[32]
    
get_user_name(idname31)
    
set_hudmessage(225000.050.4506.06.00.50.5, -1)
    
show_hudmessage(0"Use /car_crash to enter your vehicle."name)

FormulaZero is offline
SAMURAI16
BANNED
Join Date: Sep 2006
Old 02-25-2007 , 13:42   Re: Ad.
Reply With Quote #5

FormulaZero, wtf ?
maybe:
Code:
#include <amxmodx>

public client_putinserver(id)
{
    
    set_task(3.0, "welcome", id)
}

public welcome(id)
{
    set_hudmessage(225, 0, 0, 0.05, 0.45, 0, 6.0, 6.0, 0.5, 0.5, -1)
    show_hudmessage(0, "Use /car_crash to enter your vehicle.")
}
id = 0
You don't any name to check there
He want to repeat message
SAMURAI16 is offline
Send a message via MSN to SAMURAI16
FormulaZero
BANNED
Join Date: Feb 2007
Location: Sector 7G
Old 02-25-2007 , 13:44   Re: Ad.
Reply With Quote #6

I know he wants to repeat it, this will display it once they enter the server.
Name would need to be in there?
FormulaZero is offline
SAMURAI16
BANNED
Join Date: Sep 2006
Old 02-25-2007 , 13:46   Re: Ad.
Reply With Quote #7

get_user_name is for get the index name
An example:
Code:
new name[32]
get_user_name(id,name,31)
set_hudmessage(225, 0, 0, 0.05, 0.45, 0, 6.0, 6.0, 0.5, 0.5, -1)
show_hudmessage(0, "%s is an idiot",name)
SAMURAI16 is offline
Send a message via MSN to SAMURAI16
terrum
AlliedModders Donor
Join Date: Apr 2006
Location: United Kingdom
Old 02-25-2007 , 13:49   Re: Ad.
Reply With Quote #8

thanks for the help guys. but can both of you agree and make sure it works. Credit/+karma for both of you when tested and worked (if that's ok)
__________________
Thanks,
Terrum.


terrum is offline
Send a message via AIM to terrum Send a message via MSN to terrum Send a message via Skype™ to terrum
SAMURAI16
BANNED
Join Date: Sep 2006
Old 02-25-2007 , 13:52   Re: Ad.
Reply With Quote #9

yes, it's says in chat . You want HudMessage ?
SAMURAI16 is offline
Send a message via MSN to SAMURAI16
terrum
AlliedModders Donor
Join Date: Apr 2006
Location: United Kingdom
Old 02-25-2007 , 13:55   Re: Ad.
Reply With Quote #10

nope. that's exactly what i want. thank you very much (added to credits: SAMURAI16 - For the advertising script)

+karma for both of you
__________________
Thanks,
Terrum.


terrum is offline
Send a message via AIM to terrum Send a message via MSN to terrum Send a message via Skype™ to terrum
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 00:43.


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