Comparing. - 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: Comparing. (
/showthread.php?tid=257345)
Comparing. -
Exsite - 25.05.2011
Alright, I made this var:
pawn Код:
new defusecode=random(100)+random(100)+random(100);
Now I want to check if the player wrote the same number as the defusecode.
How do I do that?
Re: Comparing. -
Sascha - 25.05.2011
pawn Код:
public OnPlayerText(playerid, text[])
{
if(strval(text) == defusecode)
{
//IT'S THE SAME
}
else
{
//IT'S NOT THE SAME
}
return 1;
}
Re: Comparing. -
Exsite - 25.05.2011
Thanks, works!