SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 23/05/2020, 04:08 PM   #1
Calinut200
Big Clucker
 
Join Date: Jun 2016
Posts: 74
Reputation: 0
Default help

Helo!
I make a slots machine system and i wanna try something.
If first box object is "69" to write in chat "First textdraw is 69"

[PHP]I try something like that but this is show now
PHP Code:
if(PlayerText:linia11 == strcmp("PLD_SLOT:r_69","LD_SLOT:r_69"))
 
warning 213tag mismatchexpected tag "PlayerText"but found none ("_"
Calinut200 is offline   Reply With Quote
Old 23/05/2020, 05:02 PM   #2
PaulinSAMP
Big Clucker
 
PaulinSAMP's Avatar
 
Join Date: Apr 2020
Location: San Andreas
Posts: 85
Reputation: 3
Default Re: help

pawn Code:
if(linia11 == strcmp("PLD_SLOT:r_69","LD_SLOT:r_69"))
PaulinSAMP is offline   Reply With Quote
Old 23/05/2020, 06:28 PM   #3
Calinut200
Big Clucker
 
Join Date: Jun 2016
Posts: 74
Reputation: 0
Default Re: help

Quote:
Originally Posted by PaulinSAMP View Post
pawn Code:
if(linia11 == strcmp("PLD_SLOT:r_69","LD_SLOT:r_69"))
not work
you fucking see what say the warning..
Calinut200 is offline   Reply With Quote
Old 23/05/2020, 08:30 PM   #4
Grim_
High-roller
 
Grim_'s Avatar
 
Join Date: Sep 2008
Location: United States
Posts: 2,896
Reputation: 118
Default Re: help

You made a slot machine system, using tags, but can't fix that warning, hmm. Can you see what it says?
Grim_ is offline   Reply With Quote
Old 27/05/2020, 01:48 PM   #5
SharpenBlade
Huge Clucker
 
Join Date: May 2020
Posts: 202
Reputation: 25
Default Re: help

You should give more details about that... where you have put that code? If your textdraw is called linia11 you could do this:
PHP Code:
public OnPlayerClickPlayerTextDraw(playeridPlayerText:playertextid)
{
    if(
playertextid == linia11)
    {
        
SCM(playerid, -1"This is 69.");
        return 
true;
    }
    return 
false;

Or:
PHP Code:
if(strmatch(linia11"LD_SLOT:r_69"))
{
    
SCM(playerid, -1"This is 69.");

If you don't have strmatch:
PHP Code:
stock strmatch( const String1[ ], const String2[ ] )
{
    if( ( 
strcmpString1String2truestrlenString2 ) ) == ) && ( strlenString2 ) == strlenString1 ) ) )
        return 
1;
    else
        return 
0;

SharpenBlade 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



All times are GMT. The time now is 04:14 AM.


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