GiveplayerScore
#1

Hi,how do i make when you complete mission and you get 1 score after completing a mission?
Reply
#2

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

Put under where arh?
Reply
#4

pawn Код:
stock GivePlayerScore( playerid, pscore ) SetPlayerScore( playerid, GetPlayerScore( playerid ) + pscore );
USAGE:
pawn Код:
GivePlayerScore( playerid, 500 ); //will give player 500 score.
Reply
#5

Quote:
Originally Posted by LegendNissanGTR
Посмотреть сообщение
Put under where arh?
Just put it where your mission win gets called.
Reply
#6

mission win? what you mean mission win?
Reply
#7

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
Reply
#8

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. :/
Reply
#9

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
Reply
#10

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)