HELP PLEASE
#1

Okay, I have a problem, I have this line:

GameTextForPlayer(playerid,"~b~WELCOME To ~g~Las Venturas:~r~ True Crime ~y~v5.6!", 1000, 0);

Now, this line shows for the player that spawns from class selection, the problem I have is that when the person (or me) respawns after death, it repeats the game text/welcome message again. I DON'T WANT THIS.

I want that line to show only ONCE for the 1st time a player spawns, not every time the player dies and respawns, so when the player see's that welcome message for the 1st time, it will be the last time until he rejoins the server again.

Easier terms:

The problem: Connect > Class Selection > Spawn (WELCOME MESSAGE) > Die > Respawn (SHOWS WELCOME MESSAGE again)

Should be like so: Connect > Class Selection > Spawn (WELCOME MESSAGE) > Die > Respawn (NO WELCOME MESSAGE is what I want it to be)

Sorry if you don't understand it well, but please help
Reply
#2

Use a boolean to check if the player had already spawned once:
pawn Код:
new bool:FirstTime[MAX_PLAYERS] = {true, ...};

public OnPlayerSpawn(playerid)
{
    if(FirstTime[playerid] == true)
    {
        // game text code here
        FirstTime[playerid] = false;
    }
    return 1;
}
Reply
#3

AHH, thanks so much bro, it worked
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)