[FilterScript] Radio Transmission + Checkpoint System.
#1

Hello everyone,

Today I have created a new script called Radio Transmission I have mainly Created it for Zombie Server but you guys can also use it as a automated message system by reading this script you can know how simple it is created. i have mainly created this for new people. who can learn to script.


Features:

Radio Transmission every 5 min.
Exciting Audio Messages.
easy to understood.


Tools needed:

#include a_samp.inc
#include streamer.inc
#include foreach.inc


Created by:

Owen007(me)
MBilal(me)

Download:
Click here to download v1.0 (Not recommend)
Click here to download v1.1 (Recommend)
Github
p.s for better experience of the script put it in my gm and then check.

Suggestion are appreciated.
Reply
#2

WTF is that dude you're using alot of timers this will ... any server.
Код:
public OnFilterScriptInit()
{
	//Transmission Play time:-
 	SetTimer("TransMission",180000,false);   //timers 180 x 1000 means that 180 sec  { Extra about these transmission }
 	SetTimer("TransMission1",360000,false);  // total of 180+180=360                  False means that each timer wont repeat.
 	SetTimer("TransMission2",540000,false);  // total of 360+180=540                  Transmission 1,2,3 these numbers are not necessary but i added them to make a deatil.
 	SetTimer("TransMission3",660000,false);  // total of 540+180=660
 	SetTimer("TransMission4",840000,false);  // total of 660+180=840
 	SetTimer("TransMission5",960000,false);  // total of 840+180=960
 	SetTimer("TransMission6",1140000,false);  // total of 960+180=1140
 	SetTimer("TransMission7",1320000,false);  // total of 1140+180=1320
 	SetTimer("TransMission8",1500000,false);  // total of 1320+180=1500
 	SetTimer("TransMission9",1680000,false);  // total of 1500+180=1680
 	//Sound Play time:-
 	SetTimerEx("PlaySound",180000,false,"i");   // same here as transmission comment
 	SetTimerEx("PlaySound1",360000,false,"i");
 	SetTimerEx("PlaySound2",540000,false,"i");
 	SetTimerEx("PlaySound3",660000,false,"i");
 	SetTimerEx("PlaySound4",840000,false,"i");
 	SetTimerEx("PlaySound5",960000,false,"i");
 	SetTimerEx("PlaySound6",1140000,false,"i");
 	SetTimerEx("PlaySound7",1320000,false,"i");
 	SetTimerEx("PlaySound8",1500000,false,"i");
 	SetTimerEx("PlaySound9",1680000,false,"i");
 	//Cp Play time:-
 	SetTimerEx("ShowCP",180000, false, "i");     // same here as transmission comment
 	SetTimerEx("ShowCP1",360000, false, "i");
 	SetTimerEx("ShowCP2",540000, false, "i");
 	SetTimerEx("ShowCP3", 660000, false, "i");
 	SetTimerEx("ShowCP4", 840000, false, "i");
 	SetTimerEx("ShowCP5", 960000, false, "i");
 	SetTimerEx("ShowCP6", 1140000, false, "i");
 	SetTimerEx("ShowCP7", 1320000, false, "i");
 	SetTimerEx("ShowCP8", 1500000, false, "i");
 	SetTimerEx("ShowCP9", 1680000, false, "i");

	print("\n--------------------------------------");
	print(" Transmission + Checkpint System Loaded.");
	print("--------------------------------------\n");
	return 1;
}
I recommend use only 1 timer and one function only
use switch statement in that function to show message use Counter
and soo on depend on message u want.
try to avoid thee timers.
Код:
 
public OnFilterScriptInit()
{
SetTimer("Function",10*60*1000,1);
return 1;
}

forward Function();
public Function()
{
switch(Counter)
{
Counter++;
case 1:
{
    SendClientMessageToAll(RED,"~Radio TRANSMISSION~");
    SendClientMessageToAll(GREEN,"If any Survivours is hearing this message");
    SendClientMessageToAll(GREEN,"Please go to ____Glen Park___ for further assisstance");
    SendClientMessageToAll(GREEN,"Umbrella Corp had setup their for survivors");
    SendClientMessageToAll(GREEN,"We have Food and Medical Service");
    SendClientMessageToAll(GREEN,"Please be safe while arriving here or zombies will hunt you down.");
    PlayAudioStreamForPlayer(playerid,"http://k003.kiwi6.com/hotlink/blb3aqymb1/Glen_park.mp3");
    SetPlayerCheckpoint(playerid, 1969.99, -1199.42, 25.64, 50.0); //CheckPoint 1
    return 1;
}
case 2:
{
    SendClientMessageToAll(RED,"~Radio TRANSMISSION~");
    SendClientMessageToAll(GREEN,"If any Survivours is hearing this message");
    SendClientMessageToAll(GREEN,"Please go to ___Santa Maria Beach___ for further assisstance");
    SendClientMessageToAll(GREEN,"Umbrella Corp had setup their for survivors");
    SendClientMessageToAll(GREEN,"We have Food and Medical Service");
    SendClientMessageToAll(GREEN,"Please be safe while arriving here or zombies will hunt you down.");
    PlayAudioStreamForPlayer(playerid,"http://k003.kiwi6.com/hotlink/346l57lq9m/Santa_beacg.mp3");
}
case 3:
{

}
case 4:
{

}
case 5:
{

}

}
return 1;
}
Don't forget to reset counter in last case you used.
also watch timers.
https://sampwiki.blast.hk/wiki/SetTimer
Reply
#3

Quote:
Originally Posted by MBilal
Посмотреть сообщение
WTF is that dude you're using alot of timers this will ... any server.
Код:
public OnFilterScriptInit()
{
	//Transmission Play time:-
 	SetTimer("TransMission",180000,false);   //timers 180 x 1000 means that 180 sec  { Extra about these transmission }
 	SetTimer("TransMission1",360000,false);  // total of 180+180=360                  False means that each timer wont repeat.
 	SetTimer("TransMission2",540000,false);  // total of 360+180=540                  Transmission 1,2,3 these numbers are not necessary but i added them to make a deatil.
 	SetTimer("TransMission3",660000,false);  // total of 540+180=660
 	SetTimer("TransMission4",840000,false);  // total of 660+180=840
 	SetTimer("TransMission5",960000,false);  // total of 840+180=960
 	SetTimer("TransMission6",1140000,false);  // total of 960+180=1140
 	SetTimer("TransMission7",1320000,false);  // total of 1140+180=1320
 	SetTimer("TransMission8",1500000,false);  // total of 1320+180=1500
 	SetTimer("TransMission9",1680000,false);  // total of 1500+180=1680
 	//Sound Play time:-
 	SetTimerEx("PlaySound",180000,false,"i");   // same here as transmission comment
 	SetTimerEx("PlaySound1",360000,false,"i");
 	SetTimerEx("PlaySound2",540000,false,"i");
 	SetTimerEx("PlaySound3",660000,false,"i");
 	SetTimerEx("PlaySound4",840000,false,"i");
 	SetTimerEx("PlaySound5",960000,false,"i");
 	SetTimerEx("PlaySound6",1140000,false,"i");
 	SetTimerEx("PlaySound7",1320000,false,"i");
 	SetTimerEx("PlaySound8",1500000,false,"i");
 	SetTimerEx("PlaySound9",1680000,false,"i");
 	//Cp Play time:-
 	SetTimerEx("ShowCP",180000, false, "i");     // same here as transmission comment
 	SetTimerEx("ShowCP1",360000, false, "i");
 	SetTimerEx("ShowCP2",540000, false, "i");
 	SetTimerEx("ShowCP3", 660000, false, "i");
 	SetTimerEx("ShowCP4", 840000, false, "i");
 	SetTimerEx("ShowCP5", 960000, false, "i");
 	SetTimerEx("ShowCP6", 1140000, false, "i");
 	SetTimerEx("ShowCP7", 1320000, false, "i");
 	SetTimerEx("ShowCP8", 1500000, false, "i");
 	SetTimerEx("ShowCP9", 1680000, false, "i");

	print("\n--------------------------------------");
	print(" Transmission + Checkpint System Loaded.");
	print("--------------------------------------\n");
	return 1;
}
I recommend use only 1 timer and one function only
use switch statement in that function to show message use Counter
and soo on depend on message u want.
try to avoid thee timers.
Код:
 
public OnFilterScriptInit()
{
SetTimer("Function",10*60*1000,1);
return 1;
}

forward Function();
public Function()
{
switch(Counter)
{
Counter++;
case 1:
{
    SendClientMessageToAll(RED,"~Radio TRANSMISSION~");
    SendClientMessageToAll(GREEN,"If any Survivours is hearing this message");
    SendClientMessageToAll(GREEN,"Please go to ____Glen Park___ for further assisstance");
    SendClientMessageToAll(GREEN,"Umbrella Corp had setup their for survivors");
    SendClientMessageToAll(GREEN,"We have Food and Medical Service");
    SendClientMessageToAll(GREEN,"Please be safe while arriving here or zombies will hunt you down.");
    PlayAudioStreamForPlayer(playerid,"http://k003.kiwi6.com/hotlink/blb3aqymb1/Glen_park.mp3");
    SetPlayerCheckpoint(playerid, 1969.99, -1199.42, 25.64, 50.0); //CheckPoint 1
    return 1;
}
case 2:
{
    SendClientMessageToAll(RED,"~Radio TRANSMISSION~");
    SendClientMessageToAll(GREEN,"If any Survivours is hearing this message");
    SendClientMessageToAll(GREEN,"Please go to ___Santa Maria Beach___ for further assisstance");
    SendClientMessageToAll(GREEN,"Umbrella Corp had setup their for survivors");
    SendClientMessageToAll(GREEN,"We have Food and Medical Service");
    SendClientMessageToAll(GREEN,"Please be safe while arriving here or zombies will hunt you down.");
    PlayAudioStreamForPlayer(playerid,"http://k003.kiwi6.com/hotlink/346l57lq9m/Santa_beacg.mp3");
}
case 3:
{

}
case 4:
{

}
case 5:
{

}

}
return 1;
}
Don't forget to reset counter in last case you used.
also watch timers.
https://sampwiki.blast.hk/wiki/SetTimer
Oh good ty for that I am new scripter so i don't know that much ty once again I will try to do it.

edit: bro its not working i have tried but nothing works. my fs is perfect because if i add 1 timer then the messages will become random and the cps order will destory.
Reply
#4

with SO many timers that would be slow AF
Reply
#5

Quote:
Originally Posted by xTURBOx
Посмотреть сообщение
with SO many timers that would be slow AF
so bro tell me how can i switch?
Reply
#6

Use variables + a timer that REPEATS
Reply
#7

The message will not become random if you switch with counter and increase counter when message show and set counter to 0 when you show last message mean last case.
Reply
#8

Nice one
Reply
#9

Quote:
Originally Posted by MBilal
Посмотреть сообщение
The message will not become random if you switch with counter and increase counter when message show and set counter to 0 when you show last message mean last case.
ok bilal working on it
Reply
#10

Such wondrful FS , good job mate
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)