Race...
#1

No,im not asking how to make races!
What i wanna ask is....

For example i have 1 checkpoint (like a race) and the first player that enters it wins something ,second player gets something too and third,same as above!
How to check that?

Thanks!
Reply
#2

Nothing more than

pawn Код:
static winner;

switch(++winner) {
    case 1: GameTextForPlayer(playerid, "First", 5000, 4);
    case 2: GameTextForPlayer(playerid, "Second", 5000, 4);
    case 3: GameTextForPlayer(playerid, "Third", 5000, 4);
}
And if the race ends
pawn Код:
winner = 0;
Reply
#3

I would like to have something like...when a player comes out as 3rd,the race ends!
Ok ill try something!
Reply
#4

Help im stuck Ok so i have made the command to TP an put player in Vehicle!
I have create the Finish Checkpoint but im stuck here...help
Reply
#5

So just

pawn Код:
static winner;

switch(++winner) {
    case 1: GameTextForPlayer(playerid, "First", 5000, 4);
    case 2: GameTextForPlayer(playerid, "Second", 5000, 4);
    case 3: {
        winner = 0;
        for(new i; i != MAX_PLAYERS; i++) {
            if(PlayerCheckpoint[i] == RACE_CHECKPOINT)
            { //pseudo check for getting all players who attend the race
                SetPlayerPos(i, 0.0, 0.0, 0.0); //Remove the players from race
            }
        }
        GameTextForPlayer(playerid, "Third", 5000, 4);
        SendClientMessage(playerid, 0xFFFF00FF, "Race ended!");
    }
}
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)