Raised This Month: $ Target: $400
 0% 

[Request] Advert Messages


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
raizo11
BANNED
Join Date: Dec 2013
Location: https://t.me/pump_upp
Old 05-09-2019 , 04:39   Re: [Request] Advert Messages
Reply With Quote #4

Code:
#include <amxmodx>
#include <colorchat>
 
#define PLUGIN "Lang Message"
#define VERSION "1.0"
#define AUTOR   "raizo"


new AdvTimeOne, AdvTimeTwo;

new const LANG_FILE[][] =
{
    "[en]",
    "ADVERTISMENT_ONE = ^1Put ^3message^1 here ^4please^1!",
    "ADVERTISMENT_TWO = ^1Put ^3here^1 message ^4please^1!",

    " ",
    "[ro]",

    "ADVERTISMENT_ONE = ^1Pune ^3mesajul^1 aici ^4te rog^1!",
    "ADVERTISMENT_TWO = ^1Pune ^3aici^1 mesajul ^4te rog^1!"
}

public plugin_init()
{
    register_plugin(PLUGIN, VERSION, AUTOR);

    AdvTimeOne = register_cvar("amx_messageone","60.0");
    AdvTimeTwo = register_cvar("amx_messagetwo","120.0");
   
    set_task(get_pcvar_float(AdvTimeOne), "AdvertismentOne");
    set_task(get_pcvar_float(AdvTimeTwo), "AdvertismentTwo");
 
    register_dictionary("lang_messages.txt")
}

public plugin_precache()
{  
    if(!file_exists("addons/amxmodx/data/lang/lang_messages.txt"))
    {
        for(new i=0;i< sizeof LANG_FILE;i++)
        {
            write_file("addons/amxmodx/data/lang/lang_messages.txt", LANG_FILE[i]);
        }
    }
   
}


public AdvertismentOne() ColorChat(0, GREEN, "^3[^4Lang Messages^3]^1 %L", LANG_PLAYER, "ADVERTISMENT_ONE"), set_task(get_pcvar_float(AdvTimeOne), "AdvertismentOne");

public AdvertismentTwo() ColorChat(0, GREEN, "^3[^4Lang Messages^3]^1 %L", LANG_PLAYER, "ADVERTISMENT_TWO"), set_task(get_pcvar_float(AdvTimeTwo), "AdvertismentTwo");

Code:
#include <amxmodx>
#include <colorchat>
 
#define PLUGIN "Lang Message"
#define VERSION "1.0"
#define AUTOR   "raizo"


new AdvTime

new const LANG_FILE[][] =
{
    "[en]",
    "ADVERTISMENT_ONE = ^1Put ^3message^1 here ^4please ONE ^1!",
    "ADVERTISMENT_TWO = ^1Put ^3here^1 message ^4please TWO ^1!",
    "ADVERTISMENT_THREE = ^1Put ^3message^1 here ^4please THREE^1!",
    "ADVERTISMENT_FOUR = ^1Put ^3here^1 message ^4please FOUR^1!",
    "ADVERTISMENT_FIVE = ^1Put ^3message^1 here ^4please FIVE^1!",
    "ADVERTISMENT_SIX = ^1Put ^3here^1 message ^4please SIX^1!",
    "ADVERTISMENT_SEVEN = ^1Put ^3message^1 here ^4please SEVEN^1!",
    "ADVERTISMENT_EIGHT = ^1Put ^3here^1 message ^4please EIGHT^1!",
    "ADVERTISMENT_NINE = ^1Put ^3message^1 here ^4please NINE^1!",
    "ADVERTISMENT_TEN = ^1Put ^3here^1 message ^4please TEN^1!"
}

new const LANG_FILE_PREFIXES[][] =
{
    "ADVERTISMENT_ONE",
    "ADVERTISMENT_TWO",
    "ADVERTISMENT_THREE",
    "ADVERTISMENT_FOUR",
    "ADVERTISMENT_FIVE",
    "ADVERTISMENT_SIX",
    "ADVERTISMENT_SEVEN",
    "ADVERTISMENT_EIGHT",
    "ADVERTISMENT_NINE",
    "ADVERTISMENT_TEN"

}

public plugin_init()
{
    register_plugin(PLUGIN, VERSION, AUTOR);

    AdvTime = register_cvar("amx_messageone","60.0");
   
    set_task(get_pcvar_float(AdvTime), "Advertisment");
 
    register_dictionary("lang_messages.txt")
}

public plugin_precache()
{  
    if(!file_exists("addons/amxmodx/data/lang/lang_messages.txt"))
    {
        for(new i=0;i< sizeof LANG_FILE;i++)
        {
            write_file("addons/amxmodx/data/lang/lang_messages.txt", LANG_FILE[i]);
        }
    }
   
}

public Advertisment()ColorChat(0, GREEN, "^3[^4Lang Messages^3]^1 %L", LANG_PLAYER, LANG_FILE_PREFIXES[random(sizeof(LANG_FILE_PREFIXES))] ), set_task(get_pcvar_float(AdvTime), "Advertisment");
raizo11 is offline
Send a message via ICQ to raizo11 Send a message via AIM to raizo11 Send a message via MSN to raizo11 Send a message via Yahoo to raizo11 Send a message via Skype™ to raizo11
 



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:57.


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