Onplayertext
#1

Heey guys
I made a skillmenu with onplayertext. If you typ a number you get that skill. I made 10 skills but i cant figure out how you can get it work with '10' because you get errors.1-9 works fine.
Pls help
Admigo
Reply
#2

Code?
Reply
#3

if(text[0] == '10') The 10 gives the errors 0-9 works fine
Reply
#4

Well, text[0] is 1 character. that means you have to make like
pawn Код:
if(text[0] == '1' && text[1] == '0')
Reply
#5

But then he choose skill 1
Reply
#6

or you can do it like that:
pawn Код:
if(strfind(text, "10", true) == 0)
strfind return the index number.
Reply
#7

Sorry dont work
Reply
#8

Do anyone have idea how to fix this?
Reply
#9

If(strval(text)==10)
Reply
#10

Quote:
Originally Posted by THE_KNOWN
Посмотреть сообщение
If(strval(text)==10)
OMG!Thank you so much!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)