SA-MP Forums Archive
Help With Chat - 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 With Chat (/showthread.php?tid=74629)



Help With Chat - TehSeren - 24.04.2009

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?


Re: Help With Chat - MenaceX^ - 24.04.2009

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


Re: Help With Chat - TehSeren - 24.04.2009

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.


Re: Help With Chat - Joe Staff - 24.04.2009

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");
}



Re: Help With Chat - TehSeren - 24.04.2009

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.



Re: Help With Chat - Joe Staff - 24.04.2009

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