You must have 99 score to this command. FOR [99 Score],
#1

If i have 99 score it don't work if i put in 100 it worked... it must be 99 score or higher to use this command.

Код:
CMD:test(playerid, params[])
{
    if (GetPlayerScore(playerid) > 99)
    {
	        SendClientMessage(playerid, -1, "Worked!");
	    	return 1;
    }
    return SendClientMessage(playerid, COLOUR_RED, "You must have 99 or higher score to this command.");
}
Reply
#2

Quote:
Originally Posted by DerickClark
Посмотреть сообщение
If i have 99 score it don't work if i put in 100 it worked... it must be 99 score or higher to use this command.

Код:
CMD:test(playerid, params[])
{
    if (GetPlayerScore(playerid) > 99)
    {
	        SendClientMessage(playerid, -1, "Worked!");
	    	return 1;
    }
    return SendClientMessage(playerid, COLOUR_RED, "You must have 99 or higher score to this command.");
}
Make
PHP код:
 if (GetPlayerScore(playerid) > 99
>
PHP код:
 if (GetPlayerScore(playerid) >= 99
Your original condition means... if its MORE THAN 99 (so 100+), with the one i gave you it means 99 OR BIGGER
Reply
#3

Thank you. It worked.
Reply
#4

Or you can do, '> 98' which would be 99 as well.

'> 98' and '>= 99' are basically the same.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)