Increase/Decrease Score Stocks - 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: Increase/Decrease Score Stocks (
/showthread.php?tid=481900)
Increase/Decrease Score Stocks -
AnonScripter - 18.12.2013
can somebody tell me how to script Increase/Decrease Score Stocks?
pawn Код:
IncreaseScore(playerid, 1); //Increase player's score by 1
DecreaseScore(playerid, 1); //Decrease player's score by 1
instead of:
SetPlayerScore(playerid, GetPlayerScore(playerid)+1);
SetPlayerScore(playerid, GetPlayerScore(playerid)-1);
Re: Increase/Decrease Score Stocks -
Excelize - 18.12.2013
Код:
stock IncreaseScore(playerid)
{
SetPlayerScore(playerid, +1);
}
stock DecreaseScore(playerid)
{
SetPlayerScore(playerid, -1);
}
This should work.
Re: Increase/Decrease Score Stocks -
RenSoprano - 18.12.2013
pawn Код:
stock IncreaseScore(playerid, amount)
{
SetPlayerScore(playerid, GetPlayerScore(playerid) + amount);
}
stock DecreaseScore(playerid, amount)
{
SetPlayerScore(playerid, GetPlayerScore(playerid) - amount);
}
Re: Increase/Decrease Score Stocks -
AnonScripter - 18.12.2013
thanks