GiveplayerScore - 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: GiveplayerScore (
/showthread.php?tid=197295)
GiveplayerScore -
LegendNissanGTR - 08.12.2010
Hi,how do i make when you complete mission and you get 1 score after completing a mission?
Re: GiveplayerScore -
Jeffry - 08.12.2010
pawn Код:
SetPlayerScore(playerid, GetPlayerScore(playerid)+1));
Re: GiveplayerScore -
LegendNissanGTR - 08.12.2010
Put under where arh?
Re: GiveplayerScore -
Zh3r0 - 08.12.2010
pawn Код:
stock GivePlayerScore( playerid, pscore ) SetPlayerScore( playerid, GetPlayerScore( playerid ) + pscore );
USAGE:
pawn Код:
GivePlayerScore( playerid, 500 ); //will give player 500 score.
Re: GiveplayerScore -
Jeffry - 08.12.2010
Quote:
Originally Posted by LegendNissanGTR
Put under where arh?
|
Just put it where your mission win gets called.
Re: GiveplayerScore -
LegendNissanGTR - 08.12.2010
mission win? what you mean mission win?
Re: GiveplayerScore - rjjj - 08.12.2010
Put it in the top of your gamemode:
pawn Код:
#define GivePlayerScore(%1, %2); SetPlayerScore(%1, GetPlayerScore(%1)+%2));
Now you can add the score points, like this:
pawn Код:
GivePlayerScore(playerid, 5);//It Will add 5 score points to the score of a player.
I hope that i have helped
Re: GiveplayerScore -
Jeffry - 08.12.2010
Quote:
Originally Posted by LegendNissanGTR
Hi,how do i make when you complete mission and you get 1 score after completing a mission?
|
You should have a mission script, else you can't win a mission. Put the code there!!
If you don't have a mission script, then you should create one first. :/
Re: GiveplayerScore -
LegendNissanGTR - 08.12.2010
No wait i dont get it i dont know where to put GivePlayerScore(playerid, 5);//It Will add 5 score points to the score of a player.
heres the script
http://pastebin.com/XCPHMaDA
Re: GiveplayerScore -
knackworst - 08.12.2010
Just use:
pawn Код:
SetPlayerScore(playerid, GetPlayerScore(playerid) + 1); //Change one to the amount you want
I like this more than making your own giveplayerscore system... even-tough it's pretty much the same
What line is the ending a mission function in your scipt? I can't find it :X