score help - 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: score help (
/showthread.php?tid=273302)
score help -
MA_proking - 01.08.2011
In my server score is equal to money
but I don't want that please help
Re: score help -
PrawkC - 01.08.2011
then don't set the players score to their money .. its honestly as easy as that, and I will not post here again.
Re: score help -
MA_proking - 01.08.2011
pawn Код:
dUserSetINT(PlayerName(playerid)).("money",GetPlayerMoney(playerid));
pawn Код:
GetPlayerName(playerid, playrname, sizeof(playrname));
for(new i = 0; i < MAX_SAVE; i++) {
if(isStringSame(savedNames[i], playrname, MAX_PLAYER_NAME)) {
GivePlayerMoney(playerid, savedInfo[i][0]);
bounty[playerid] = savedInfo[i][2];
savedInfo[i][0]=savedInfo[i][1]=savedInfo[i][2]=0;
savedNames[i][0]=0;
for(new j = 0; j < MAX_WEAPONS; j++) {
playerWeapons[playerid][j]=savedWeapons[i][j];
savedWeapons[i][j]=0;
}
SendClientMessage(playerid, COLOR_GREEN, "Your money has been restored.");
}
}
pawn Код:
GetPlayerName(playerid, playername, sizeof(playername));
format(savedNames[savePos], MAX_PLAYER_NAME, "%s",playername);
savedInfo[savePos][0] = GetPlayerMoney(playerid);
savedInfo[savePos][2] = bounty[playerid];
savedInfo[savePos][3] = 0;
where to change please help
Re: score help -
Basicz - 01.08.2011
I can't even see you put a "SetPlayerScore" over there.
Probably you got a timer or OnPlayerUpdate that will set's the player's score with the same value of his money.
The code should looks like :
pawn Код:
public OnPlayerUpdate( playerid ) // Or something like this ( A timer )
{
SetPlayerScore( playerid, GetPlayerMoney( playerid ) );
return 1;
}
If you found it's a timer, remove the timer.
Re: score help -
MA_proking - 01.08.2011
thanks