Random message
#1

hello!
i have a problem with ramdom message. I want to make random message to show in every 1 min( 60 seconds)
here is the code below
pawn Код:
//--------Credits--------------------
//--------Lookin---------------------
//-----------------------------------

#include <a_samp>

#define FILTERSCRIPT
#define GREEN 0x0FFF00FF
#define RED 0xFF0A00FF
#define orange  0xFF9900AA

forward msg1();
forward msg2();
forward msg3();
forward msg4();
forward msg5();
forward msg6();
forward msg7();
forward msg8();
forward msg9();
forward msg10();
forward msg11();
forward msg12();
forward msg13();
forward msg14();
forward msg15();
forward msg16();
forward msg17();
forward msg18();
forward msg19();
forward msg20();
forward msg21();
forward msg22();
forward msg23();
forward msg24();
forward msg25();

forward AutoWeather();

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Lookinsamaw by Lookin [V2.0]");
    print("--------------------------------------\n");


    SetTimer("msg2",30000,false);

    SetTimer("AutoWeather", 600000, 1);
    AutoWeather();
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

public AutoWeather()
{
    new RandonWeather = random(15);
    SetWeather(RandonWeather);
    return 1;
}

public msg1()
{
    SendClientMessageToAll(orange,"INFO: For Bank Command, type /bankhelp.");
    SetTimer("msg2",100000,false);
    return 1;
}

public msg2()
{
    SendClientMessageToAll(orange,"INFO: For Medic Command, type /medichelp.");
    SetTimer("msg3",100000,false);
    return 1;
}

public msg3()
{
    SendClientMessageToAll(orange,"INFO: For Criminal Comman, type /crimehelp(l).");
    SetTimer("msg4",100000,false);
    return 1;
}

public msg4()
{
    SendClientMessageToAll(orange,"INFO: For Gang Command, type /ganghelp(l).");
    SetTimer("msg5",100000,false);
    return 1;
}

public msg5()
{
    SendClientMessageToAll(orange,"INFO: For Teleport Command,type /telehelp(l).");
    SetTimer("msg1",100000,false);
    return 1;
}
public msg6()
{
    SendClientMessageToAll(orange,"INFO: For Ramp Commands, type /ramphelp");
    SetTimer("msg5",100000,false);
    return 1;
}
public msg7()
{
    SendClientMessageToAll(orange,"INFO: For CellPhone Commands, type /cellhelp(l).");
    SetTimer("msg6",100000,false);
    return 1;
}
public msg8()
{
    SendClientMessageToAll(orange,"INFO: Asking For ADMIN/PROMOTIONWill Reduce Your Chance.");
    SetTimer("msg7",100000,false);
    return 1;
}
public msg9()
{
    SendClientMessageToAll(orange,"We have Rules at RBTDM, so if you want to stay safe, read /rules.");
    SendClientMessageToAll(orange,"If you are caught breaking these rules, you may be punished by the Server Administrators!");
    SetTimer("msg8",100000,false);
    return 1;
}
public msg10()
{
    SendClientMessageToAll(orange,"Hacking and using of illegal mods are strictly not permitted on RBTDM.If you see a hacker,");
    SendClientMessageToAll(orange,"illegal moder or Rule breaker, then use /Report <ID> <Reason> to report them to Server Administrators.");
    SetTimer("msg9",100000,false);
    return 1;
}
public msg11()
{
    SendClientMessageToAll(orange,"INFO: Join Our Forum/Website at rbtdm.webs.com");
    SetTimer("msg10",100000,false);
    return 1;
}
public msg12()
{
    SendClientMessageToAll(orange,"INFO: To Join Formula One Race, type /f1track");
    SetTimer("msg11",100000,false);
    return 1;
}
public msg13()
{
    SendClientMessageToAll(orange,"INFO: You Can Quickly Call Your Vehicles By Using , /vcall[1-10]");
    SetTimer("msg12",100000,false);
    return 1;
}
public msg14()
{
    SendClientMessageToAll(orange,"RBTDM Scriptor is always checking for new thing to add to the server.If you have any Ideas to give them,");
    SendClientMessageToAll(orange,"Then post in our 'Suggestions' Board located on our forums at: rbtdm.webs.com");
    SetTimer("msg13",100000,false);
    return 1;
}
public msg15()
{
    SendClientMessageToAll(orange,"INFO: For Law Commands, type /lawhelp(l).");
    SetTimer("msg14",100000,false);
    return 1;
}  
public msg16()
{
    SendClientMessageToAll(orange,"INFO: For ADMIN/ACCOUNT Commands, type /lhelp.");
    SetTimer("msg15",100000,false);
    return 1;
}
public msg17()
{
    SendClientMessageToAll(orange,"INFO: For House Commands, type/hmenu.");
    SetTimer("msg16",100000,false);
    return 1;
}
public msg18()
{
    SendClientMessageToAll(orange,"INFO: For Business Commands, type /bmenu.");
    SetTimer("msg17",100000,false);
    return 1;
}
public msg19()
{
    SendClientMessageToAll(orange,"INFO: For Vehicle Commands, type /vmenu.");
    SetTimer("msg18",100000,false);
    return 1;
}
public msg20()
{
    SendClientMessageToAll(orange,"Are your orginal skin boring? Why not buy more skins, Just goto /dshop.");
    SendClientMessageToAll(orange,"And you can save your skin by using /saveskin <ID>");
    SetTimer("msg19",100000,false);
    return 1;
}
public msg21()
{
    SendClientMessageToAll(orange,"Here at RBTDM we have help cmds ,so if you need help with law commands etc..type /help.");
    SetTimer("msg20",100000,false);
    return 1;
}
public msg22()
{
    SendClientMessageToAll(orange,"Here at RBTDM Non Admins can spawn Temp Cars with /veh and /rc.");
    SetTimer("msg21",100000,false);
    return 1;
}
public msg23()
{
    SendClientMessageToAll(orange,"Our server has a [RB] Clan to represent the Awesome players of YoUnG Generations Fun Time Server!");
    SendClientMessageToAll(orange,"You can Apply in this clan on our forums located at: rbtdm.webs.com");
    SetTimer("msg22",100000,false);
    return 1;
}
public msg24()
{
    SendClientMessageToAll(orange,"INFO: To See Our Awesome Variety Commands, type /newcmds");
    SetTimer("msg23",100000,false);
    return 1;
}
public msg25()
{
    SendClientMessageToAll(orange,"You want to be stylish? Do /sglass [1-33]");
    SetTimer("msg24",100000,false);
    return 1;
}
Please help me to make it 60 seconds
Reply
#2

PHP код:
//--------Credits--------------------
//--------Lookin---------------------
//-----------------------------------

#include <a_samp>

#define FILTERSCRIPT
#define GREEN 0x0FFF00FF
#define RED 0xFF0A00FF
#define orange  0xFF9900AA

forward msg1();
forward msg2();
forward msg3();
forward msg4();
forward msg5();
forward msg6();
forward msg7();
forward msg8();
forward msg9();
forward msg10();
forward msg11();
forward msg12();
forward msg13();
forward msg14();
forward msg15();
forward msg16();
forward msg17();
forward msg18();
forward msg19();
forward msg20();
forward msg21();
forward msg22();
forward msg23();
forward msg24();
forward msg25();

forward AutoWeather();

public 
OnFilterScriptInit()
{
    print(
"\n--------------------------------------");
    print(
" Lookinsamaw by Lookin [V2.0]");
    print(
"--------------------------------------\n");


    
SetTimer("msg1",30000,false);

    
SetTimer("AutoWeather"6000001);
    
AutoWeather();
    return 
1;
}

public 
OnFilterScriptExit()
{
    return 
1;
}

public 
AutoWeather()
{
    new 
RandonWeather random(15);
    
SetWeather(RandonWeather);
    return 
1;
}

public 
msg1()
{
    
SendClientMessageToAll(orange,"INFO: For Bank Command, type /bankhelp.");
    
SetTimer("msg2",100000,false);
    return 
1;
}

public 
msg2()
{
    
SendClientMessageToAll(orange,"INFO: For Medic Command, type /medichelp.");
    
SetTimer("msg3",100000,false);
    return 
1;
}

public 
msg3()
{
    
SendClientMessageToAll(orange,"INFO: For Criminal Comman, type /crimehelp(l).");
    
SetTimer("msg4",100000,false);
    return 
1;
}

public 
msg4()
{
    
SendClientMessageToAll(orange,"INFO: For Gang Command, type /ganghelp(l).");
    
SetTimer("msg5",100000,false);
    return 
1;
}

public 
msg5()
{
    
SendClientMessageToAll(orange,"INFO: For Teleport Command,type /telehelp(l).");
    
SetTimer("msg1",100000,false);
    return 
1;
}
public 
msg6()
{
    
SendClientMessageToAll(orange,"INFO: For Ramp Commands, type /ramphelp");
    
SetTimer("msg5",100000,false);
    return 
1;
}
public 
msg7()
{
    
SendClientMessageToAll(orange,"INFO: For CellPhone Commands, type /cellhelp(l).");
    
SetTimer("msg6",100000,false);
    return 
1;
}
public 
msg8()
{
    
SendClientMessageToAll(orange,"INFO: Asking For ADMIN/PROMOTIONWill Reduce Your Chance.");
    
SetTimer("msg7",100000,false);
    return 
1;
}
public 
msg9()
{
    
SendClientMessageToAll(orange,"We have Rules at RBTDM, so if you want to stay safe, read /rules.");
    
SendClientMessageToAll(orange,"If you are caught breaking these rules, you may be punished by the Server Administrators!");
    
SetTimer("msg8",100000,false);
    return 
1;
}
public 
msg10()
{
    
SendClientMessageToAll(orange,"Hacking and using of illegal mods are strictly not permitted on RBTDM.If you see a hacker,");
    
SendClientMessageToAll(orange,"illegal moder or Rule breaker, then use /Report <ID> <Reason> to report them to Server Administrators.");
    
SetTimer("msg9",100000,false);
    return 
1;
}
public 
msg11()
{
    
SendClientMessageToAll(orange,"INFO: Join Our Forum/Website at rbtdm.webs.com");
    
SetTimer("msg10",100000,false);
    return 
1;
}
public 
msg12()
{
    
SendClientMessageToAll(orange,"INFO: To Join Formula One Race, type /f1track");
    
SetTimer("msg11",100000,false);
    return 
1;
}
public 
msg13()
{
    
SendClientMessageToAll(orange,"INFO: You Can Quickly Call Your Vehicles By Using , /vcall[1-10]");
    
SetTimer("msg12",100000,false);
    return 
1;
}
public 
msg14()
{
    
SendClientMessageToAll(orange,"RBTDM Scriptor is always checking for new thing to add to the server.If you have any Ideas to give them,");
    
SendClientMessageToAll(orange,"Then post in our 'Suggestions' Board located on our forums at: rbtdm.webs.com");
    
SetTimer("msg13",100000,false);
    return 
1;
}
public 
msg15()
{
    
SendClientMessageToAll(orange,"INFO: For Law Commands, type /lawhelp(l).");
    
SetTimer("msg14",100000,false);
    return 
1;
}   
public 
msg16()
{
    
SendClientMessageToAll(orange,"INFO: For ADMIN/ACCOUNT Commands, type /lhelp.");
    
SetTimer("msg15",100000,false);
    return 
1;
}
public 
msg17()
{
    
SendClientMessageToAll(orange,"INFO: For House Commands, type/hmenu.");
    
SetTimer("msg16",100000,false);
    return 
1;
}
public 
msg18()
{
    
SendClientMessageToAll(orange,"INFO: For Business Commands, type /bmenu.");
    
SetTimer("msg17",100000,false);
    return 
1;
}
public 
msg19()
{
    
SendClientMessageToAll(orange,"INFO: For Vehicle Commands, type /vmenu.");
    
SetTimer("msg18",100000,false);
    return 
1;
}
public 
msg20()
{
    
SendClientMessageToAll(orange,"Are your orginal skin boring? Why not buy more skins, Just goto /dshop.");
    
SendClientMessageToAll(orange,"And you can save your skin by using /saveskin <ID>");
    
SetTimer("msg19",100000,false);
    return 
1;
}
public 
msg21()
{
    
SendClientMessageToAll(orange,"Here at RBTDM we have help cmds ,so if you need help with law commands etc..type /help.");
    
SetTimer("msg20",100000,false);
    return 
1;
}
public 
msg22()
{
    
SendClientMessageToAll(orange,"Here at RBTDM Non Admins can spawn Temp Cars with /veh and /rc.");
    
SetTimer("msg21",100000,false);
    return 
1;
}
public 
msg23()
{
    
SendClientMessageToAll(orange,"Our server has a [RB] Clan to represent the Awesome players of YoUnG Generations Fun Time Server!");
    
SendClientMessageToAll(orange,"You can Apply in this clan on our forums located at: rbtdm.webs.com");
    
SetTimer("msg22",100000,false);
    return 
1;
}
public 
msg24()
{
    
SendClientMessageToAll(orange,"INFO: To See Our Awesome Variety Commands, type /newcmds");
    
SetTimer("msg23",100000,false);
    return 
1;
}
public 
msg25()
{
    
SendClientMessageToAll(orange,"You want to be stylish? Do /sglass [1-33]");
    
SetTimer("msg24",100000,false);
    return 
1;

Reply
#3

Quote:
Originally Posted by WoodPecker
Посмотреть сообщение
PHP код:
//--------Credits--------------------
//--------Lookin---------------------
//-----------------------------------
#include <a_samp>
#define FILTERSCRIPT
#define GREEN 0x0FFF00FF
#define RED 0xFF0A00FF
#define orange  0xFF9900AA
forward msg1();
forward msg2();
forward msg3();
forward msg4();
forward msg5();
forward msg6();
forward msg7();
forward msg8();
forward msg9();
forward msg10();
forward msg11();
forward msg12();
forward msg13();
forward msg14();
forward msg15();
forward msg16();
forward msg17();
forward msg18();
forward msg19();
forward msg20();
forward msg21();
forward msg22();
forward msg23();
forward msg24();
forward msg25();
forward AutoWeather();
public 
OnFilterScriptInit()
{
    print(
"\n--------------------------------------");
    print(
" Lookinsamaw by Lookin [V2.0]");
    print(
"--------------------------------------\n");
    
SetTimer("msg1",30000,false);
    
SetTimer("AutoWeather"6000001);
    
AutoWeather();
    return 
1;
}
public 
OnFilterScriptExit()
{
    return 
1;
}
public 
AutoWeather()
{
    new 
RandonWeather random(15);
    
SetWeather(RandonWeather);
    return 
1;
}
public 
msg1()
{
    
SendClientMessageToAll(orange,"INFO: For Bank Command, type /bankhelp.");
    
SetTimer("msg2",100000,false);
    return 
1;
}
public 
msg2()
{
    
SendClientMessageToAll(orange,"INFO: For Medic Command, type /medichelp.");
    
SetTimer("msg3",100000,false);
    return 
1;
}
public 
msg3()
{
    
SendClientMessageToAll(orange,"INFO: For Criminal Comman, type /crimehelp(l).");
    
SetTimer("msg4",100000,false);
    return 
1;
}
public 
msg4()
{
    
SendClientMessageToAll(orange,"INFO: For Gang Command, type /ganghelp(l).");
    
SetTimer("msg5",100000,false);
    return 
1;
}
public 
msg5()
{
    
SendClientMessageToAll(orange,"INFO: For Teleport Command,type /telehelp(l).");
    
SetTimer("msg1",100000,false);
    return 
1;
}
public 
msg6()
{
    
SendClientMessageToAll(orange,"INFO: For Ramp Commands, type /ramphelp");
    
SetTimer("msg5",100000,false);
    return 
1;
}
public 
msg7()
{
    
SendClientMessageToAll(orange,"INFO: For CellPhone Commands, type /cellhelp(l).");
    
SetTimer("msg6",100000,false);
    return 
1;
}
public 
msg8()
{
    
SendClientMessageToAll(orange,"INFO: Asking For ADMIN/PROMOTIONWill Reduce Your Chance.");
    
SetTimer("msg7",100000,false);
    return 
1;
}
public 
msg9()
{
    
SendClientMessageToAll(orange,"We have Rules at RBTDM, so if you want to stay safe, read /rules.");
    
SendClientMessageToAll(orange,"If you are caught breaking these rules, you may be punished by the Server Administrators!");
    
SetTimer("msg8",100000,false);
    return 
1;
}
public 
msg10()
{
    
SendClientMessageToAll(orange,"Hacking and using of illegal mods are strictly not permitted on RBTDM.If you see a hacker,");
    
SendClientMessageToAll(orange,"illegal moder or Rule breaker, then use /Report <ID> <Reason> to report them to Server Administrators.");
    
SetTimer("msg9",100000,false);
    return 
1;
}
public 
msg11()
{
    
SendClientMessageToAll(orange,"INFO: Join Our Forum/Website at rbtdm.webs.com");
    
SetTimer("msg10",100000,false);
    return 
1;
}
public 
msg12()
{
    
SendClientMessageToAll(orange,"INFO: To Join Formula One Race, type /f1track");
    
SetTimer("msg11",100000,false);
    return 
1;
}
public 
msg13()
{
    
SendClientMessageToAll(orange,"INFO: You Can Quickly Call Your Vehicles By Using , /vcall[1-10]");
    
SetTimer("msg12",100000,false);
    return 
1;
}
public 
msg14()
{
    
SendClientMessageToAll(orange,"RBTDM Scriptor is always checking for new thing to add to the server.If you have any Ideas to give them,");
    
SendClientMessageToAll(orange,"Then post in our 'Suggestions' Board located on our forums at: rbtdm.webs.com");
    
SetTimer("msg13",100000,false);
    return 
1;
}
public 
msg15()
{
    
SendClientMessageToAll(orange,"INFO: For Law Commands, type /lawhelp(l).");
    
SetTimer("msg14",100000,false);
    return 
1;
}   
public 
msg16()
{
    
SendClientMessageToAll(orange,"INFO: For ADMIN/ACCOUNT Commands, type /lhelp.");
    
SetTimer("msg15",100000,false);
    return 
1;
}
public 
msg17()
{
    
SendClientMessageToAll(orange,"INFO: For House Commands, type/hmenu.");
    
SetTimer("msg16",100000,false);
    return 
1;
}
public 
msg18()
{
    
SendClientMessageToAll(orange,"INFO: For Business Commands, type /bmenu.");
    
SetTimer("msg17",100000,false);
    return 
1;
}
public 
msg19()
{
    
SendClientMessageToAll(orange,"INFO: For Vehicle Commands, type /vmenu.");
    
SetTimer("msg18",100000,false);
    return 
1;
}
public 
msg20()
{
    
SendClientMessageToAll(orange,"Are your orginal skin boring? Why not buy more skins, Just goto /dshop.");
    
SendClientMessageToAll(orange,"And you can save your skin by using /saveskin <ID>");
    
SetTimer("msg19",100000,false);
    return 
1;
}
public 
msg21()
{
    
SendClientMessageToAll(orange,"Here at RBTDM we have help cmds ,so if you need help with law commands etc..type /help.");
    
SetTimer("msg20",100000,false);
    return 
1;
}
public 
msg22()
{
    
SendClientMessageToAll(orange,"Here at RBTDM Non Admins can spawn Temp Cars with /veh and /rc.");
    
SetTimer("msg21",100000,false);
    return 
1;
}
public 
msg23()
{
    
SendClientMessageToAll(orange,"Our server has a [RB] Clan to represent the Awesome players of YoUnG Generations Fun Time Server!");
    
SendClientMessageToAll(orange,"You can Apply in this clan on our forums located at: rbtdm.webs.com");
    
SetTimer("msg22",100000,false);
    return 
1;
}
public 
msg24()
{
    
SendClientMessageToAll(orange,"INFO: To See Our Awesome Variety Commands, type /newcmds");
    
SetTimer("msg23",100000,false);
    return 
1;
}
public 
msg25()
{
    
SendClientMessageToAll(orange,"You want to be stylish? Do /sglass [1-33]");
    
SetTimer("msg24",100000,false);
    return 
1;

Its the same
Reply
#4

Oh, my god! That's probably THE most inefficient code I have ever seen. There are parameters to a function, you know. You're better off following this: https://sampwiki.blast.hk/wiki/Random_Messages
Reply
#5

Can you do it on the code which i gave you plz
Reply
#6

RBTM just copy what's on the wiki, that has all the information you need to make it a sufficient as possible.
Reply
#7

Quote:
Originally Posted by WoodPecker
Посмотреть сообщение
pawn Код:
//--------Credits--------------------
//--------Lookin---------------------
//-----------------------------------

#include <a_samp>

#define FILTERSCRIPT
#define GREEN 0x0FFF00FF
#define RED 0xFF0A00FF
#define orange  0xFF9900AA

forward msg1();
forward msg2();
forward msg3();
forward msg4();
forward msg5();
forward msg6();
forward msg7();
forward msg8();
forward msg9();
forward msg10();
forward msg11();
forward msg12();
forward msg13();
forward msg14();
forward msg15();
forward msg16();
forward msg17();
forward msg18();
forward msg19();
forward msg20();
forward msg21();
forward msg22();
forward msg23();
forward msg24();
forward msg25();

forward AutoWeather();

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Lookinsamaw by Lookin [V2.0]");
    print("--------------------------------------\n");


    SetTimer("msg1",30000,false);

    SetTimer("AutoWeather", 600000, 1);
    AutoWeather();
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

public AutoWeather()
{
    new RandonWeather = random(15);
    SetWeather(RandonWeather);
    return 1;
}

public msg1()
{
    SendClientMessageToAll(orange,"INFO: For Bank Command, type /bankhelp.");
    SetTimer("msg2",100000,false);
    return 1;
}

public msg2()
{
    SendClientMessageToAll(orange,"INFO: For Medic Command, type /medichelp.");
    SetTimer("msg3",100000,false);
    return 1;
}

public msg3()
{
    SendClientMessageToAll(orange,"INFO: For Criminal Comman, type /crimehelp(l).");
    SetTimer("msg4",100000,false);
    return 1;
}

public msg4()
{
    SendClientMessageToAll(orange,"INFO: For Gang Command, type /ganghelp(l).");
    SetTimer("msg5",100000,false);
    return 1;
}

public msg5()
{
    SendClientMessageToAll(orange,"INFO: For Teleport Command,type /telehelp(l).");
    SetTimer("msg1",100000,false);
    return 1;
}
public msg6()
{
    SendClientMessageToAll(orange,"INFO: For Ramp Commands, type /ramphelp");
    SetTimer("msg5",100000,false);
    return 1;
}
public msg7()
{
    SendClientMessageToAll(orange,"INFO: For CellPhone Commands, type /cellhelp(l).");
    SetTimer("msg6",100000,false);
    return 1;
}
public msg8()
{
    SendClientMessageToAll(orange,"INFO: Asking For ADMIN/PROMOTIONWill Reduce Your Chance.");
    SetTimer("msg7",100000,false);
    return 1;
}
public msg9()
{
    SendClientMessageToAll(orange,"We have Rules at RBTDM, so if you want to stay safe, read /rules.");
    SendClientMessageToAll(orange,"If you are caught breaking these rules, you may be punished by the Server Administrators!");
    SetTimer("msg8",100000,false);
    return 1;
}
public msg10()
{
    SendClientMessageToAll(orange,"Hacking and using of illegal mods are strictly not permitted on RBTDM.If you see a hacker,");
    SendClientMessageToAll(orange,"illegal moder or Rule breaker, then use /Report <ID> <Reason> to report them to Server Administrators.");
    SetTimer("msg9",100000,false);
    return 1;
}
public msg11()
{
    SendClientMessageToAll(orange,"INFO: Join Our Forum/Website at rbtdm.webs.com");
    SetTimer("msg10",100000,false);
    return 1;
}
public msg12()
{
    SendClientMessageToAll(orange,"INFO: To Join Formula One Race, type /f1track");
    SetTimer("msg11",100000,false);
    return 1;
}
public msg13()
{
    SendClientMessageToAll(orange,"INFO: You Can Quickly Call Your Vehicles By Using , /vcall[1-10]");
    SetTimer("msg12",100000,false);
    return 1;
}
public msg14()
{
    SendClientMessageToAll(orange,"RBTDM Scriptor is always checking for new thing to add to the server.If you have any Ideas to give them,");
    SendClientMessageToAll(orange,"Then post in our 'Suggestions' Board located on our forums at: rbtdm.webs.com");
    SetTimer("msg13",100000,false);
    return 1;
}
public msg15()
{
    SendClientMessageToAll(orange,"INFO: For Law Commands, type /lawhelp(l).");
    SetTimer("msg14",100000,false);
    return 1;
}  
public msg16()
{
    SendClientMessageToAll(orange,"INFO: For ADMIN/ACCOUNT Commands, type /lhelp.");
    SetTimer("msg15",100000,false);
    return 1;
}
public msg17()
{
    SendClientMessageToAll(orange,"INFO: For House Commands, type/hmenu.");
    SetTimer("msg16",100000,false);
    return 1;
}
public msg18()
{
    SendClientMessageToAll(orange,"INFO: For Business Commands, type /bmenu.");
    SetTimer("msg17",100000,false);
    return 1;
}
public msg19()
{
    SendClientMessageToAll(orange,"INFO: For Vehicle Commands, type /vmenu.");
    SetTimer("msg18",100000,false);
    return 1;
}
public msg20()
{
    SendClientMessageToAll(orange,"Are your orginal skin boring? Why not buy more skins, Just goto /dshop.");
    SendClientMessageToAll(orange,"And you can save your skin by using /saveskin <ID>");
    SetTimer("msg19",100000,false);
    return 1;
}
public msg21()
{
    SendClientMessageToAll(orange,"Here at RBTDM we have help cmds ,so if you need help with law commands etc..type /help.");
    SetTimer("msg20",100000,false);
    return 1;
}
public msg22()
{
    SendClientMessageToAll(orange,"Here at RBTDM Non Admins can spawn Temp Cars with /veh and /rc.");
    SetTimer("msg21",100000,false);
    return 1;
}
public msg23()
{
    SendClientMessageToAll(orange,"Our server has a [RB] Clan to represent the Awesome players of YoUnG Generations Fun Time Server!");
    SendClientMessageToAll(orange,"You can Apply in this clan on our forums located at: rbtdm.webs.com");
    SetTimer("msg22",100000,false);
    return 1;
}
public msg24()
{
    SendClientMessageToAll(orange,"INFO: To See Our Awesome Variety Commands, type /newcmds");
    SetTimer("msg23",100000,false);
    return 1;
}
public msg25()
{
    SendClientMessageToAll(orange,"You want to be stylish? Do /sglass [1-33]");
    SetTimer("msg24",100000,false);
    return 1;
}
You did all timers false so how it will send?

/--------------------------------------------------\
There you go i have made an example for you.

pawn Код:
#include <a_samp>

new RandomMSG[][] = {
    "Random Message 1",
    "Random Message 2",
    "Random Message 3",
    "Random Message 4",
    "Random Message 5",
    "Random Message 6",
    "Random Message 7",
    "Random Message 8" };

forward @SendMSG();

#if defined FILTERSCRIPT

public OnFilterScriptInit() {
    print("\n--------------------------------------");
    print(" Random Messages.");
    print("--------------------------------------\n");
   
    SetTimer("@SendMSG", 60000, true); //Setting an timer to send Random messages sent every 60 seconds. (1 minute).
    return 1; }

public OnFilterScriptExit() {
    return 1; }

#endif

@SendMSG() {
    new randMSG = random(sizeof(RandomMSG));
    SendClientMessageToAll(0x00FFFFFF, RandomMSG[randMSG]); } // Make sure to replace your own colour.
Thanks.
Reply
#8

But i can wrie only 1 line
pawn Код:
"Random Message 8"
I need 2 lines to write
Reply
#9

Quote:
Originally Posted by RBTDM
Посмотреть сообщение
But i can wrie only 1 line
pawn Код:
"Random Message 8"
I need 2 lines to write
What do you mean?
Reply
#10

I mean like this
pawn Код:
SendClientMessageToAll(orange,"Our server has a [RB] Clan to represent the Awesome players of YoUnG Generations Fun Time Server!");
    SendClientMessageToAll(orange,"You can Apply in this clan on our forums located at: rbtdm.webs.com");
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)