change
#1

How can i change this to give score instead of give money i know how to do it normally but not sure how to do it when it has para

Код:
GivePlayerMoney(playerid,Race[Player[playerid][IdRace]][Cost]*2);
Many thanks
Reply
#2

I guess to change it to Score, I don't know if it works with all this you added
pawn Код:
GivePlayerScore(playerid,Race[Player[playerid][IdRace]][Cost]*2);
Reply
#3

pawn Код:
SetPlayerScore( playerid, GetPlayerScore( playerid ) + Race[ Player [ playerid ][ IdRace ] ][ Cost ] * 2 );
Reply
#4

Yer i got a error

Код:
C:\Users\GTA ONLY\Desktop\The Eclipse V4.8\filterscripts\PRaceSystemEng.pwn(811) : error 017: undefined symbol "GivePlayerScore"
Is there are i can define it with the normal way i would do it?
Reply
#5

My mad, it was wrong. SmiT's way is the correct
Reply
#6

Quote:
Originally Posted by SmiT
Посмотреть сообщение
pawn Код:
SetPlayerScore( playerid, GetPlayerScore( playerid ) + Race[ Player [ playerid ][ IdRace ] ][ Cost ] * 2 );
Will this not just set the players score not added it to the players score they already have?
Reply
#7

It get player score and set the number you want.
I knew that you can set +1 for example. I am not sure if the *2 works
Reply
#8

ill try that as it compiled but had no effect ingame
Reply
#9

Quote:
Originally Posted by manchestera
Посмотреть сообщение
Will this not just set the players score not added it to the players score they already have?
It will be added to the player score.

SetPlayerScore( playerid, GetPlayerScore( playerid ) + Race[ Player [ playerid ][ IdRace ] ][ Cost ] * 2 );

EDIT: If you want GivePlayerScore function you can simply do:
pawn Код:
stock GivePlayerScore( playerid, score ) SetPlayerScore( playerid, GetPlayerScore( playerid ) + score );
And you can use Kostas' way! -
pawn Код:
GivePlayerScore( playerid, Race[ Player [ playerid ][ IdRace ] ][ Cost ] * 2 );
Reply
#10

Thanks Guys got it working now ive tried to rep you but i must have reped you before so many thanks.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)