1st has won the race?
#5

pawn Код:
case 17:
         {
              static place;
              place++;
              DisablePlayerRaceCheckpoint(playerid);
              PlayerPlaySound(playerid, 1056, 0.0, 0.0, 10.0);
              SetPlayerRaceCheckpoint(playerid, 1,3825.4634,-2516.0691,46.5305,3829.0635,-2531.2246,52.5604,10);
              Stats[playerid] = 18;
              new name[MAX_PLAYER_NAME], string[100];
              GetPlayerName(playerid, name, sizeof(name));
              format(string, sizeof(string), "Player %s Has Finshed Race [%d%s]", name, place, (place == 1) ? ("st") : (place == 2) ? ("nd") : (place == 3) ? ("rd") : ("th")); // how would i make it for all playrs go like player noob has finshed second player carbon has finshed 3rd
              SendClientMessageToAll(ADMIN_RED, string);
              return 1;
         }
Hope it works.

Few notes: This automatically shows "1st", "2nd", "3th", "4th", etc with the correct characters after the number.

Also: You might need to make "place" global (instead of static), or place it at the beginning of the callback so you can reset it to 0 again.
Reply


Messages In This Thread
1st has won the race? - by Kitten - 06.09.2010, 22:29
Re: 1st has won the race? - by Kitten - 07.09.2010, 00:40
Re: 1st has won the race? - by willsuckformoney - 07.09.2010, 01:18
Re: 1st has won the race? - by PinkFloydLover - 07.09.2010, 01:53
Re: 1st has won the race? - by Hiddos - 07.09.2010, 06:31
Re: 1st has won the race? - by Kitten - 07.09.2010, 07:27
Re: 1st has won the race? - by Hiddos - 07.09.2010, 07:35

Forum Jump:


Users browsing this thread: 1 Guest(s)