07.09.2010, 06:31
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;
}
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.