SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Tutorials

Reply
 
Thread Tools Display Modes
Old 14/07/2017, 01:01 PM   #21
2xRichard
Little Clucker
 
2xRichard's Avatar
 
Join Date: Jul 2017
Location: IRAN
Posts: 4
Reputation: 0
Default Re: Random Messages [Simple]

// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#include <a_samp>
#if defined FILTERSCRIPT
#else
#endif

#define COLOR_GREEN 0x33AA33AA
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_BLUE 0x0000BBAA
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_RED 0xCC0000AA

//Forwards//
forward RandomMessages();

//Random Messages//
new RandomMessages[][] =
{
"Message 1 (Change this)",
"Message 2 (Change this)",
"Message 3 (Change this)"
};

public OnGameModeInit()
{
SetTimer("RandomMessages",95000,1);
return 1;
}

public RandomMessages()
{
SendClientMessageToAll(COLOR_GREEN, RandomMessages[random(sizeof(RandomMessages))];
return 1;
}



//Get To me Eror :
C:\Users\Richard\Desktop\RandomPms.pwn(36) : error 021: symbol already defined: "RandomMessages"
C:\Users\Richard\Desktop\RandomPms.pwn(37) : error 028: invalid subscript (not an array or too many subscripts): "RandomMessages"
C:\Users\Richard\Desktop\RandomPms.pwn(37) : error 072: "sizeof" operator is invalid on "function" symbols
C:\Users\Richard\Desktop\RandomPms.pwn(37) : error 029: invalid expression, assumed zero
C:\Users\Richard\Desktop\RandomPms.pwn(37) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
5 Errors.
2xRichard is offline   Reply With Quote
Old 14/07/2017, 01:11 PM   #22
R4nd4ll
Big Clucker
 
R4nd4ll's Avatar
 
Join Date: Jul 2017
Location: Los Santos, The Federal Bureau of Investigation HQ
Posts: 134
Reputation: 56
Default Re: Random Messages [Simple]

Can you give me the whole code ?
I can't read this shit.
R4nd4ll is online now   Reply With Quote
Old 14/07/2017, 01:24 PM   #23
xMoBi
Little Clucker
 
xMoBi's Avatar
 
Join Date: Jul 2017
Location: Pakistan
Posts: 27
Reputation: 8
Default Re: Random Messages [Simple]

The code in this topic has a naming error in function and variable.
__________________
PrestigeSteve Hosting - Garry's Mod, SA-MP, MTA,
Minecraft, Web Hosting and much more! (http://www.prestigesteve.com)
xMoBi is offline   Reply With Quote
Old 19/08/2017, 05:51 AM   #24
2xRichard
Little Clucker
 
2xRichard's Avatar
 
Join Date: Jul 2017
Location: IRAN
Posts: 4
Reputation: 0
Question Re: Random Messages [Simple]

H4RR1s
if you noob don't send post ! its a ez ez xD fixed if you need it I send fs ?
2xRichard is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Tutorial] Simple Random Messages 2KY Tutorials 4 19/01/2012 06:58 PM
[Tutorial] How to create Simple Random Messages. [Nikk] Tutorials 13 16/01/2012 04:15 PM
[FilterScript] SW 3D Random Messages [VERY SIMPLE][13.12.2011] SpiderWalk Filterscripts 8 13/12/2011 03:51 PM
[Help] Random Messages Trawltrawl Help Archive 4 16/08/2011 08:50 PM
[FilterScript] P-Messages [Random Messages system] Pooh7 Filterscripts 5 30/11/2010 03:43 PM


All times are GMT. The time now is 09:21 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.