09.06.2010, 13:57
Quote:
Originally Posted by DJDhan
Put this under OnGameModeInit
Код:
SetTimer("RankUpdate",4000,1); Код:
forward RankUpdate(playerid); public RankUpdate(playerid) { if(GetPlayerScore(playerid) >= 100 && pRank[playerid] < 1) { new msg[256]; new name[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,MAX_PLAYER_NAME); SendClientMessage(playerid,lgreen,"Congratulation! You won 100k for achieving 100 points."); format(msg,sizeof(msg),"~~%s (ID:%d) has won 10k for achieving 100 points.",name,playerid); SendClientMessageToAll(0xFF0000AA,msg); GivePlayerMoney(playerid, 100000); pRank[playerid] = 1; format(msg,sizeof(msg),"~~%s (ID:%d) was advanced to Rank *Newbie* for achieving 100 points.",name,playerid); SendClientMessageToAll(green,msg); Attach3DTextLabelToPlayer(newbie[playerid],playerid, 0.0, 0.0, 0.7); } //here you can add other ranks for scores like 200, 300 and more. Same as above. return 1; } |