Bugs!
#5

Quote:
Originally Posted by DJDhan
Put this under OnGameModeInit

Код:
SetTimer("RankUpdate",4000,1);
Then anywhere in the script:
Код:
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;

	
}
And I must say, You really need to learn the basics coz your code sucked :P
Maybe you shoudl learn because that aint goiung to work
Reply


Messages In This Thread
Bugs! - by ColdXX - 09.06.2010, 13:15
Re: Bugs! - by ¤Adas¤ - 09.06.2010, 13:30
Re: Bugs! - by DJDhan - 09.06.2010, 13:34
Re: Bugs! - by ColdXX - 09.06.2010, 13:52
Re: Bugs! - by NewTorran - 09.06.2010, 13:57
Re: Bugs! - by DJDhan - 09.06.2010, 15:02
Re: Bugs! - by NewTorran - 09.06.2010, 15:18
Re: Bugs! - by DJDhan - 09.06.2010, 15:25
Re: Bugs! - by ColdXX - 09.06.2010, 15:47
Re: Bugs! - by DJDhan - 09.06.2010, 15:52

Forum Jump:


Users browsing this thread: 1 Guest(s)