SA-MP Forums Archive
Player Score scripting - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Player Score scripting (/showthread.php?tid=252090)



Player Score scripting - Panormitis - 30.04.2011

I have 2 questions: When I put in my script setplayerscore if I put +0.1 score will work??
And how can I make saving for players' score?


Re: Player Score scripting - AK47317 - 30.04.2011

pawn Код:
SetPlayerScore ( playerid , GetPlayerScore ( playerid ) +1 ) ;



Re: Player Score scripting - Panormitis - 30.04.2011

Quote:
Originally Posted by AK47317
Посмотреть сообщение
pawn Код:
SetPlayerScore ( playerid , GetPlayerScore ( playerid ) +1 ) ;
Can do +0.1 ? No +1


Re: Player Score scripting - [NoV]LaZ - 30.04.2011

You can only use integers in player's score


Re: Player Score scripting - Calgon - 30.04.2011

As [NoV]LaZ said, you can only use integers (which are whole numbers) in SetPlayerScore.

What you wanted to do was add 0.1, which isn't a whole number, it's a number with a decimal point, which in PAWN is a Float.

You should also note that most SA-MP functions only accept integers.


Re: Player Score scripting - Panormitis - 30.04.2011

I have a job that player must collect checkpoints to complite the job and I want to add setplayerscore in the past checkpoint, but the problem is that I want the players to get +1 score when they complete the job 10 times, how to do this? :/


Re: Player Score scripting - Panormitis - 30.04.2011

Quote:
Originally Posted by Panormitis
Посмотреть сообщение
I have a job that player must collect checkpoints to complite the job and I want to add setplayerscore in the past checkpoint, but the problem is that I want the players to get +1 score when they complete the job 10 times, how to do this? :/
Did you understand what i mean? :/


Re: Player Score scripting - [NoV]LaZ - 30.04.2011

pawn Код:
SetPlayerScore(playerid, (GetPlayerScore(playerid) + 1));
Add that when the player finishes his jobs.