SA-MP Forums Archive
Auto Message Tool - 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: Auto Message Tool (/showthread.php?tid=90815)



Auto Message Tool - Sal_Kings - 10.08.2009

I don't know what section to put this in ..
But anyways is there a Tool for sa Mp that u can run and put in a selected message and it will basically say it for ure server automatically?



Re: Auto Message Tool - urkiefly101 - 10.08.2009

Search, Seif got one.


Re: Auto Message Tool - basker - 10.08.2009

or just do this

Код:
forward AutoMessage1
Код:
forward AutoMessage2
Код:
forward AutoMessage3
Код:
public AutoMessage1
{
  SendClientMessage(playerid,0xAA3333AA,"Put your text here");
  return 1;
}
Код:
public AutoMessage2
{
  SendClientMessage(playerid,0xAA3333AA,"Put your text here");
  return 1;
}
Код:
public AutoMessage3
{
  SendClientMessage(playerid,0xAA3333AA,"Put your text here");
  return 1;
}
and then put this in under OnGameMode
Код:
SetTimer("AutoMessage1",Time in MS,1);
SetTimer("AutoMessage2",Time in MS,1);
SetTimer("AutoMessage3",Time in MS,1);



Re: Auto Message Tool - Weirdosport - 10.08.2009

Zut, that is a fairly rank way of doing it, as it uses 3 timers, and 3 publics. And the more messages you want, the more timers you need, the more your server lags etc etc.

pawn Код:
#include <a_samp>

forward Automessage();
#define TIME 60000
#define COLOR 0xFF00FFFF

new
    Messages[][128] = {
        {"Message 1"},
        {"Message 2"},
        {"Message 3"},
        {"Message 4"}
    },
    Count;

public OnFilterScriptInit()
{
    SetTimer("Automessage", TIME, 1);
    return 1;
}

public Automessage()
{
    SendClientMessageToAll(COLOR, Messages[Count]);
//  print(Messages[Count]); //debug line
    Count++;
    if(Count == sizeof(Messages)) Count = 0;
}



Re: Auto Message Tool - basker - 10.08.2009

Quote:
Originally Posted by Weirdosport
Zut, that is a fairly rank way of doing it, as it uses 3 timers, and 3 publics. And the more messages you want, the more timers you need, the more your server lags etc etc.

pawn Код:
#include <a_samp>

forward Automessage();
#define TIME 60000
#define COLOR 0xFF00FFFF

new
    Messages[][128] = {
        {"Message 1"},
        {"Message 2"},
        {"Message 3"},
        {"Message 4"}
    },
    Count;

public OnFilterScriptInit()
{
    SetTimer("Automessage", TIME, 1);
    return 1;
}

public Automessage()
{
    SendClientMessageToAll(COLOR, Messages[Count]);
//  print(Messages[Count]); //debug line
    Count++;
    if(Count == sizeof(Messages)) Count = 0;
}
Oh lol Ye i just made it quick