Help With Chat
#1

Hey, I need my server to throw out some random messages like.

SERVER: Don't DM, it can get you banned.

How can I do that?
Reply
#2

https://sampwiki.blast.hk/wiki/Random_Messages
You better search in next time.
Reply
#3

Quote:
Originally Posted by MenaceX^
https://sampwiki.blast.hk/wiki/Random_Messages
You better search in next time.
My server had that last time..
It was buggy..

It cut off part of the message.

Oh, and not to be an ass.

BUT, do not tell me what I BETTER do.
Reply
#4

Quote:
Originally Posted by TehSeren
Oh, and not to be an ass.
May not have been intentional but you did a good job nonetheless.
pawn Код:
//Up Top of Script
forward RandomMessage();

//under OnGameModeInit()
SetTimer("RandomMessage",180000,1); // 3 minutes

//Outside of any callbacks
public RandomMessage()
{
  new tmp = random(3); //amount of messages + 1
  if(tmp==0)SendClientMessageToAll(COLOR,"MESSAGE"); //start at 0
  if(tmp==1)SendClientMessageToAll(COLOR,"MESSAGE");
  if(tmp==2)SendClientMessageToAll(COLOR,"MESSAGE");
}
Reply
#5

Quote:
Originally Posted by SilentHuntR
Quote:
Originally Posted by TehSeren
Oh, and not to be an ass.
May not have been intentional but you did a good job nonetheless.
pawn Код:
//Up Top of Script
forward RandomMessage();

//under OnGameModeInit()
SetTimer("RandomMessage",180000,1); // 3 minutes

//Outside of any callbacks
public RandomMessage()
{
  new tmp = random(3); //amount of messages + 1
  if(tmp==0)SendClientMessageToAll(COLOR,"MESSAGE"); //start at 0
  if(tmp==1)SendClientMessageToAll(COLOR,"MESSAGE");
  if(tmp==2)SendClientMessageToAll(COLOR,"MESSAGE");
}
Код:
C:\Users\Tj\Desktop\SA\Server Dedi\pawno\include\cps.inc(140) : warning 208: function with tag result used before definition, forcing reparse
C:\Users\Tj\Desktop\SA\Server Dedi\pawno\GTS-B4LV.pwn(62) : error 055: start of function body without function header
C:\Users\Tj\Desktop\SA\Server Dedi\pawno\GTS-B4LV.pwn(63) : error 021: symbol already defined: "StartSystem"
C:\Users\Tj\Desktop\SA\Server Dedi\pawno\GTS-B4LV.pwn(71) : error 021: symbol already defined: "AddPlayerClassEx"
C:\Users\Tj\Desktop\SA\Server Dedi\pawno\GTS-B4LV.pwn(77) : error 021: symbol already defined: "AddPlayerClassEx"
C:\Users\Tj\Desktop\SA\Server Dedi\pawno\GTS-B4LV.pwn(83) : error 021: symbol already defined: "AddStaticVehicle"
C:\Users\Tj\Desktop\SA\Server Dedi\pawno\GTS-B4LV.pwn(106) : error 021: symbol already defined: "AddStaticVehicle"
C:\Users\Tj\Desktop\SA\Server Dedi\pawno\GTS-B4LV.pwn(127) : error 010: invalid function or declaration
C:\Users\Tj\Desktop\SA\Server Dedi\pawno\GTS-B4LV.pwn(132) : error 010: invalid function or declaration
C:\Users\Tj\Desktop\SA\Server Dedi\pawno\GTS-B4LV.pwn(139) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


9 Errors.
Reply
#6

Heh, those are all things already in your script. My random message function isn't attach to any of those.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)