- Score - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: - Score (
/showthread.php?tid=516029)
- Score -
Blackazur - 29.05.2014
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;
}
Re: - Score -
Matess - 29.05.2014
Код:
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;
}