help message automatically - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: help message automatically (
/showthread.php?tid=89137)
help message automatically -
emuk - 31.07.2009
how do I put the message automatically in chat for all players?
for example every 5 minutes.
Re: help message automatically -
eparea51 - 30.09.2009
Quote:
Originally Posted by emuk
how do I put the message automatically in chat for all players?
for example every 5 minutes.
|
Here you go:
At the top of your gamemode:
forward automsg();
under: OnGameModeInIt:
SetTimer("automsg", 300000, 1); // This timer is for 5 minutes. Replace 300000 with 60000 if you want 1 minute.
At the bottow of your gamemode:
public automsg()
{
SendClientMessageToAll(0x0FD9FA40, "PLACE YOUR TEXT HERE WHAT THEY NEED TO SEE");
}
and done!
Re: help message automatically -
agusfn20 - 30.09.2009
Quote:
Originally Posted by eparea51
Quote:
Originally Posted by emuk
how do I put the message automatically in chat for all players?
for example every 5 minutes.
|
Here you go:
At the top of your gamemode:
forward automsg();
SetTimer("automsg", 300000, 1); // This timer is for 5 minutes. Replace 300000 with 60000 if you want 1 minute.
At the bottow of your gamemode:
public automsg()
{
SendClientMessageToAll(0x0FD9FA40, "PLACE YOUR TEXT HERE WHAT THEY NEED TO SEE");
}
and done!
|
The timer goes under OnGameModeInit
Re: help message automatically -
eparea51 - 30.09.2009
Quote:
Originally Posted by agusfn20
Quote:
Originally Posted by eparea51
Quote:
Originally Posted by emuk
how do I put the message automatically in chat for all players?
for example every 5 minutes.
|
Here you go:
At the top of your gamemode:
forward automsg();
SetTimer("automsg", 300000, 1); // This timer is for 5 minutes. Replace 300000 with 60000 if you want 1 minute.
At the bottow of your gamemode:
public automsg()
{
SendClientMessageToAll(0x0FD9FA40, "PLACE YOUR TEXT HERE WHAT THEY NEED TO SEE");
}
and done!
|
The timer goes under OnGameModeInit
|
edited ^^ stupid me ^^