Delete this. -
[Nikk] - 07.01.2012
Delete this.
Re: How to create Simple Random Messages. -
Max_Coldheart - 07.01.2012
Your explanations could be even more resolving though. For example:
pawn Code:
public MensajesRamdom()//Public what sends the messages
Yes, it can be explained like that, but I'd explain it like this:
pawn Code:
public MensajesRamdom()//Callback that sends the messages
as the term isn't public (people will understand it) but the term is callback, so I'd use it.
Else, it's a good tutorial.
Re: How to create Simple Random Messages. -
§с†¶e®РµРe - 07.01.2012
Quote:
Originally Posted by CookieJar
Your explanations could be even more resolving though. For example:
pawn Code:
public MensajesRamdom()//Public what sends the messages
Yes, it can be explained like that, but I'd explain it like this:
pawn Code:
public MensajesRamdom()//Callback that sends the messages
as the term isn't public (people will understand it) but the term is callback, so I'd use it.
Else, it's a good tutorial.
|
He's right btw cookiejar u finally got some rep huh
Re: How to create Simple Random Messages. -
Max_Coldheart - 07.01.2012
Quote:
Originally Posted by §с†¶e®РµРe
He's right btw cookiejar u finally got some rep huh
|
Yeah, for reason "GO DIE YOU FUCKING FAGGOT".
EDIT: I know I'm right =)
OT: Else, this is a good tutorial.
Re: How to create Simple Random Messages. -
Mrki_Drakula - 07.01.2012
You havent defined
MensajesRamdom() ,you defined
RandomMessages().
Re: How to create Simple Random Messages. -
John Rockie - 15.01.2012
C:\Users\JUAN\Desktop\samp03\gamemodes\ww2.pwn(205 ) : error 021: symbol already defined: "RandomMessages"
C:\Users\JUAN\Desktop\samp03\gamemodes\ww2.pwn(206 ) : error 028: invalid subscript (not an array or too many subscripts): "RandomMessages"
C:\Users\JUAN\Desktop\samp03\gamemodes\ww2.pwn(206 ) : error 072: "sizeof" operator is invalid on "function" symbols
C:\Users\JUAN\Desktop\samp03\gamemodes\ww2.pwn(206 ) : error 029: invalid expression, assumed zero
C:\Users\JUAN\Desktop\samp03\gamemodes\ww2.pwn(206 ) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
5 Errors.
Re: How to create Simple Random Messages. -
N0FeaR - 16.01.2012
Relly good
Respuesta: Re: How to create Simple Random Messages. -
[Nikk] - 16.01.2012
Quote:
Originally Posted by John Rockie
C:\Users\JUAN\Desktop\samp03\gamemodes\ww2.pwn(205 ) : error 021: symbol already defined: "RandomMessages"
C:\Users\JUAN\Desktop\samp03\gamemodes\ww2.pwn(206 ) : error 028: invalid subscript (not an array or too many subscripts): "RandomMessages"
C:\Users\JUAN\Desktop\samp03\gamemodes\ww2.pwn(206 ) : error 072: "sizeof" operator is invalid on "function" symbols
C:\Users\JUAN\Desktop\samp03\gamemodes\ww2.pwn(206 ) : error 029: invalid expression, assumed zero
C:\Users\JUAN\Desktop\samp03\gamemodes\ww2.pwn(206 ) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
5 Errors.
|
:S, for me works perfectly, neabe your gm have any simbol defined, try to test this in a blank script.
Re: Respuesta: Re: How to create Simple Random Messages. -
N0FeaR - 16.01.2012
Quote:
Originally Posted by [Nikk]
:S, for me works perfectly, neabe your gm have any simbol defined, try to test this in a blank script.
|
i get same problem that John Rockie get
Re: How to create Simple Random Messages. - T0pAz - 16.01.2012
You should see
this tutorial.
Re: How to create Simple Random Messages. -
Konstantinos - 16.01.2012
pawn Code:
#include <a_samp>new RandomMessagesList
[][] =//We create a variable || Not the same Name as the Callback we created{//open "TIP: Visit our forums! www.lala.lala",
//Example Message "Forum sa:mp it's the best web ever!",
//Example Messge "I love mi mom :D"//This is the last message, in the last message dont put a " , " in the end.};
//Closepublic OnFilterScriptInit
(){ SetTimer
("RandomMessages",
120000, true
);
// 2 minutes for message return 1;
}forward RandomMessages
();
//This will be the forwardpublic RandomMessages
()//Public what sends the messages{ SendClientMessageToAll
(0xFF0000FF, RandomMessagesList
[random(sizeof(RandomMessagesList
))]);
//Function what send the messages, with timer, and messages info. || Random from the variable with the Message List.}
Re: How to create Simple Random Messages. -
Hiddos - 16.01.2012
Quote:
Originally Posted by CookieJar
this is a good tutorial.
|
Obvious troll is obvious.
Re: How to create Simple Random Messages. -
thimo - 16.01.2012
Nikk iam dissapointed of you!
![Sad](images/smilies/sad.gif)
bad tut
Re: How to create Simple Random Messages. -
2KY - 16.01.2012
I know this is your tutorial, and I don't mean to hijack your topic, but I just felt the need to show you how I personally would do it.
pawn Code:
//At the top of your script, near your other definitions -
#define RANDOM_MESSAGE1 "This is random message numero uno!"
#define RANDOM_MESSAGE2 "This is random message numero dos!"
#define RANDOM_MESSAGE3 "This is random message numero tres!"
#define RANDOM_MESSAGETIMEINMINUTES 3 //Every three minutes a random message will be shown.
//OnGameModeInit / OnFilterScriptInit -
SetTimer("ShowARandomMessage", RANDOM_MESSAGETIMEINMINUTES*60000, true); //3 * 60000 = 180,000 milliseconds which translates to 3 minutes.
//Somewhere else in your script (OUTSIDE of a callback) -
forward ShowARandomMessage();
public ShowARandomMessage()
{
new
RandomSelection = random(3); //Randoms start from 0 and work their way up -- THEY DO NOT START AT 1.
switch(RandomSelection) {
case 0: {
return SendClientMessageToAll(0xE8B210FF, RANDOM_MESSAGE1);
}
case 1: {
return SendClientMessageToAll(0xE8B210FF, RANDOM_MESSAGE2);
}
case 2: {
return SendClientMessageToAll(0xE8B210FF, RANDOM_MESSAGE3);
}
}
return 1;
}
Like I said above, I don't mean to hijack your thread, I just felt the need to share how I personally do it.