PDA

View Full Version : KeyPad Problem [HELP]


Sting.
01/01/2012, 08:52 AM
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?

Steven82
01/01/2012, 08:55 AM
Have you tried flipping the carrot?

From "<" to ">"..

[HiC]TheKiller
01/01/2012, 08:58 AM
if(GetPlayerScore(playerid < 100))


Should actually be


if(GetPlayerScore(playerid) > 100)

Sting.
01/01/2012, 09:02 AM
Thanks! I'll try. But I want to ask then.. "<" means ? for vehicles... ?

[C]ave[M]an
01/01/2012, 09:07 AM
Thanks! I'll try. But I want to ask then.. "<" means ? for vehicles... ?
">" means greater than ... It is for the amount .
if(GetPlayerScore(playerid) >= 100)

Sting.
01/01/2012, 09:12 AM
Thank You.

jamesbond007
01/01/2012, 09:40 AM
">" ?? omgg what does this mean? remember 2nd grade math ?? -.-

xD No offence

Gh05t_
01/01/2012, 06:35 PM
">" ?? 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.