Comparing.
#1

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?
Reply
#2

pawn Код:
public OnPlayerText(playerid, text[])
{
  if(strval(text) == defusecode)
  {
    //IT'S THE SAME
  }
  else
  {
    //IT'S NOT THE SAME
  }
  return 1;
}
Reply
#3

Thanks, works!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)