Why is the spawn messed up?
#2

Well, it looks fine to me.
You could try adding some "else if" statements, instead of all those "if" ones.
I've had some problems with my script, that it would skip some statements. If there where too many "if" statements.

pawn Код:
public OnPlayerSpawn(playerid)
{
    player_zone[playerid] = -1;
    if (gTeam[playerid] == TEAM_MEDIC)
    {
        SetPlayerPos( playerid, 2015.5756, -1411.8328, 16.9922);
    }
    else if (gTeam[playerid] == TEAM_COP)
    {
        SetPlayerPos( playerid, 1568.6473, -1693.0808, 5.8906);
        HasLawEnforcementRadio[playerid] =1;
        LawEnforcementRadio[playerid] =1;
    }
    else if (gTeam[playerid] == TEAM_DRIVER)
    {
        SetPlayerPos( playerid, 1679.4591,-2249.7490, 13.3541);
    }
    else if (gTeam[playerid] == TEAM_MECHANIC)
    {
        SetPlayerPos( playerid, 1848.1210, -1863.0183, 13.5781);
    }
    return 1;
}
Also. It's maybe a good idea, to move these two around. As you have the Mechanic defined before the Driver, but I don't know.
pawn Код:
else if (gTeam[playerid] == TEAM_DRIVER)//5
    {
        SetPlayerPos( playerid, 1679.4591,-2249.7490, 13.3541);
    }
    else if (gTeam[playerid] == TEAM_MECHANIC)//4
    {
        SetPlayerPos( playerid, 1848.1210, -1863.0183, 13.5781);
    }
Reply


Messages In This Thread
Why is the spawn messed up? - by killdahobo99 - 12.08.2009, 05:06
Re: Why is the spawn messed up? - by Djiango - 12.08.2009, 06:25
Re: Why is the spawn messed up? - by WrathOfGenesis - 12.08.2009, 07:30
Re: Why is the spawn messed up? - by urkiefly101 - 12.08.2009, 09:54
Re: Why is the spawn messed up? - by James_Alex - 12.08.2009, 09:56
Re: Why is the spawn messed up? - by killdahobo99 - 12.08.2009, 16:10
Re: Why is the spawn messed up? - by FUNExtreme - 12.08.2009, 16:15
Re: Why is the spawn messed up? - by killdahobo99 - 12.08.2009, 16:17
Re: Why is the spawn messed up? - by FUNExtreme - 12.08.2009, 16:18
Re: Why is the spawn messed up? - by killdahobo99 - 12.08.2009, 16:21

Forum Jump:


Users browsing this thread: 2 Guest(s)