- Score
#1

Hello, how can i make that the Score won't go below 0? Also not -1, -2 Score etc

Код:
stock GivePlayerXP(playerid,xp)
{
	new string[128];
	pInfo[playerid][pXP] += xp;
	format(string,sizeof(string),"~n~~n~~n~~n~~n~~y~+%i",xp);
	GameTextForPlayer(playerid,string,3500,5);
	return 1;
}
Reply
#2

Код:
stock GivePlayerXP(playerid,xp)
{
	new string[128];
	pInfo[playerid][pXP] += xp;
        if(pInfo[playerid][pXP] < 0) pInfo[playerid][pXP] = 0;
	format(string,sizeof(string),"~n~~n~~n~~n~~n~~y~+%i",xp);
	GameTextForPlayer(playerid,string,3500,5);
	return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)