KeyPad Problem [HELP]
#1

I created a keypad, door's and everything. Everything is working fine. See, I want player's with the score 100 to access that office.(The Office with keypad's and door's.) So, I did...

if(IsPlayerInRangeOfPoint(playerid, 1.0, .........))
{
if(GetPlayerScore(playerid < 100))
{
MoveObject(officedoor, ..........);
MoveObject(officedoor2, .............);
SetTimerEx("officedoorclose", 5000, false, "i", playerid);
ApplyAnimation(playerid, "HEIST9", "Use_SwipeCard", 10.0, 0, 0, 0, 0, 0);
}
}

Sorry, I don't know how to do in PAWN code. So, there are no errors. Now as you see... I did if(GetPlayerScore(playerid < 100))
So I tried with a player with score 0. I hit F and the door open's!.
So again I tried with a player with the score 100. I hit F and the door doesn't open!
So, now how do I make the door open for player's with the score 100 and above?
Reply
#2

Have you tried flipping the carrot?

From "<" to ">"..
Reply
#3

pawn Код:
if(GetPlayerScore(playerid < 100))
Should actually be

pawn Код:
if(GetPlayerScore(playerid) > 100)
Reply
#4

Thanks! I'll try. But I want to ask then.. "<" means ? for vehicles... ?
Reply
#5

Quote:
Originally Posted by RTR12
Посмотреть сообщение
Thanks! I'll try. But I want to ask then.. "<" means ? for vehicles... ?
">" means greater than ... It is for the amount .
pawn Код:
if(GetPlayerScore(playerid) >= 100)
Reply
#6

Thank You.
Reply
#7

">" ?? omgg what does this mean? remember 2nd grade math ?? -.-

xD No offence
Reply
#8

Quote:
Originally Posted by jamesbond007
Посмотреть сообщение
">" ?? omgg what does this mean? remember 2nd grade math ?? -.-

xD No offence
Math is quite different to programming. We haven't been taught relational, binary, bitwise nor logical operators in advanced math. This is because the usage of the purpose of these in programming differentiates between the usage and purpose math.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)