SA-MP Forums

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

 
 
Thread Tools Display Modes
Old 23/02/2009, 01:55 PM   #1
harrold
Huge Clucker
 
Join Date: Jan 2009
Posts: 260
Reputation: 0
Default Very easy but i don't know :S

how to make something that say if you repeat yourself:
"Don't Repeat yourself!"
harrold is offline  
Old 23/02/2009, 02:01 PM   #2
MenaceX^
High-roller
 
Join Date: Aug 2008
Posts: 3,262
Reputation: 13
Default Re: Very easy but i don't know :S

Huh?
MenaceX^ is offline  
Old 23/02/2009, 02:27 PM   #3
My_Waffles_Bitch_L0L
Big Clucker
 
Join Date: Jan 2009
Posts: 140
Reputation: 0
Default Re: Very easy but i don't know :S

do u mean, when they write "ETCLOLBOLLOX" and try to write it again, it sais "Don't repeat yourself!"?
My_Waffles_Bitch_L0L is offline  
Old 23/02/2009, 02:28 PM   #4
Nero_3D
High-roller
 
Nero_3D's Avatar
 
Join Date: Jun 2007
Location: Germany
Posts: 2,856
Reputation: 692
Default Re: Very easy but i don't know :S

pawn Code:
//OnPlayerText
static stext[MAX_PLAYERS][128];
if(!strfind(text, stext[playerid], true))
  return SendClientMessage(playerid, 0xFFFFFFAA, "Don't Repeat yourself!"), false;
format(stext[playerid], sizeof stext[], text);

if you type

hello
hello -> "Don't Repeat yourself!" and dont sends the hello in public

or

hello
hellottt -> "Don't Repeat yourself!" and dont sends the hellottt in public
Nero_3D is offline  
Old 23/02/2009, 05:01 PM   #5
harrold
Huge Clucker
 
Join Date: Jan 2009
Posts: 260
Reputation: 0
Default Re: Very easy but i don't know :S

Thanks but what's the different static, new ?
harrold is offline  
Old 23/02/2009, 05:03 PM   #6
Nero_3D
High-roller
 
Nero_3D's Avatar
 
Join Date: Jun 2007
Location: Germany
Posts: 2,856
Reputation: 692
Default Re: Very easy but i don't know :S

look that up in pawn-lang.pdf
Nero_3D is offline  
Old 23/02/2009, 05:13 PM   #7
harrold
Huge Clucker
 
Join Date: Jan 2009
Posts: 260
Reputation: 0
Default Re: Very easy but i don't know :S

No please tell me i'm on my psp so i can't read the pdf
harrold is offline  
Old 23/02/2009, 05:45 PM   #8
Nero_3D
High-roller
 
Nero_3D's Avatar
 
Join Date: Jun 2007
Location: Germany
Posts: 2,856
Reputation: 692
Default Re: Very easy but i don't know :S

ah ok

Quote:
Originally Posted by pawn-lang.pdf
 State variable declarations
A state variable is a global variable with a state classi er appended at the end. The scope and the lifespan of the variable are restricted to the states that are listed in the classi er.
or

a static variable is just a variable that holds the saved value after the end
Nero_3D is offline  
Old 27/02/2009, 05:55 PM   #9
harrold
Huge Clucker
 
Join Date: Jan 2009
Posts: 260
Reputation: 0
Default Re: Very easy but i don't know :S

Quote:
Originally Posted by ♣ ⓐⓢⓢ
pawn Code:
//OnPlayerText
static stext[MAX_PLAYERS][128];
if(!strfind(text, stext[playerid], true))
  return SendClientMessage(playerid, 0xFFFFFFAA, "Don't Repeat yourself!"), false;
format(stext[playerid], sizeof stext[], text);

if you type

hello
hello -> "Don't Repeat yourself!" and dont sends the hello in public

or

hello
hellottt -> "Don't Repeat yourself!" and dont sends the hellottt in public
But now i can Get if i type hello
And i say Does anybody know what Hello means
Then it block!

Or if i press s
Then it block if i say i don't like roadblocks on the bridges!
Then it block !!
harrold is offline  
Old 27/02/2009, 06:00 PM   #10
beckzy
Beta Tester
 
Join Date: Dec 2006
Posts: 1,289
Reputation: 172
Default Re: Very easy but i don't know :S

Use strcmp instead
__________________
beckzy is offline  
 

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
Need an Easy Fs MarcoNecroX Help Archive 10 10/04/2010 07:03 PM
Very easy! Daniel_June Help Archive 4 05/02/2010 07:16 PM
[Easy] Need help GrilloBR Help Archive 1 19/10/2009 02:17 AM
help plz -easy- Sal_Kings Server Support 12 13/04/2009 01:16 AM
Easy help.. anyone? Shellegg Help Archive 4 19/03/2009 12:12 AM


All times are GMT. The time now is 01:02 AM.


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