Need HELP with My stat script
#1

Hello can eyone tell me whats wrong?
This part work all time if player even have PlayerInfo[playerid][pStrenghtPoints] = 0; it set PlayerInfo[playerid][pStrenght] += 1;
______________
It should work like if player have 100 pStrenghtPoints it will set [pStrenght] += 1; and reset to 0 pStrenghtPoints

Код:
if (PlayerInfo[playerid][pStrenghtPoints] <= 100)
	  {
	  PlayerInfo[playerid][pStrenghtPoints] = 0;
	  PlayerInfo[playerid][pStrenght] += 1;
	  SendClientMessage(playerid, COLOR_GREEN,"Strenght upgraded");
	  }
	  else
		{
		SendClientMessage(playerid, COLOR_GRAD6, "Not enough for strenght.");
		return 1;
		}
Reply
#2

Easy thing, you just made a small mistake

pawn Код:
if (PlayerInfo[playerid][pStrenghtPoints] <= 100)
You check if the StrengthPoints are LESS here, you just switched the sign the false way around, just put it like

pawn Код:
if (PlayerInfo[playerid][pStrenghtPoints] >= 100)
and it should work :P
Reply
#3

Thank you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)