09.06.2010, 13:15
Hey guys!
I have few bugs on ma server!
Ok so i have a ranking system on the GM,with 5 ranks ok so at 100 points the player should get the Newbie rank but it doesnt work for everyone,but sometimes when some players join they receive Newbie rank tho they dont have 100 score!
Ow yea and there is another bug! When the player that has a rank connects it sends the message and gives him the Money and the rank again!
Code here
I have few bugs on ma server!
Ok so i have a ranking system on the GM,with 5 ranks ok so at 100 points the player should get the Newbie rank but it doesnt work for everyone,but sometimes when some players join they receive Newbie rank tho they dont have 100 score!
Ow yea and there is another bug! When the player that has a rank connects it sends the message and gives him the Money and the rank again!
Code here
pawn Код:
public score100(playerid)
{
if(ScoreUpdate[playerid] == 0)
{
if(GetPlayerScore(playerid) >= 100)
{
SendClientMessage(playerid,lgreen,"Congratulation! You won 100k for achieving 100 points.");
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,MAX_PLAYER_NAME);
format(msg,sizeof(msg),"~~%s has won 10k for achieving 100 points.",name,playerid);
SendClientMessageToAll(0xFF0000F,msg);
GivePlayerMoney(playerid, 100000);
ScoreUpdate[playerid] = 1;
pRank[playerid] = 1;
GetPlayerName(playerid,name,MAX_PLAYER_NAME);
format(msg,sizeof(msg),"~~%s was advanced to Rank *Newbie* for achieving 100 points.",name,playerid);
SendClientMessageToAll(green,msg);
Attach3DTextLabelToPlayer(newbie[playerid],playerid, 0.0, 0.0, 0.7);
}
}
}