OnPlayerSpawn (if, else if)
#5

Quote:
Originally Posted by Marricio
Посмотреть сообщение
First check if the player is injured, and in last instance set the player to the last position. If it still doesn't work, debug your pFlag value.

pawn Код:
if(IsBit(pFlag[playerid], pBIT_INJURED))
{
    ....
}
else if(IsBit(pFlag[playerid], pBIT_HOSPITALIZED))
{
    ....
}
else(IsBit(pFlag[playerid], pBIT_CAGED))
{
    ....
}
else if(pInfo[playerid][Prison] >= 2)
{
    ....
}
else if(pInfo[playerid][PosX] == 0.0 && pInfo[playerid][PosY] == 0.0) // new player
{
    new position = random(sizeof(CivilianSpawn));
    SetPlayerPos(playerid, CivilianSpawn[position][0], CivilianSpawn[position][1], CivilianSpawn[position][2]+0.3);
    SetPlayerFacingAngle(playerid, CivilianSpawn[position][3]);
    SetPlayerInterior(playerid, 0);
    SetPlayerVirtualWorld(playerid, 0);
    SetCameraBehindPlayer(playerid);
}
else if(pInfo[playerid][PosX] != 0.0 && pInfo[playerid][PosY] != 0.0) // existing player
{
    SetPlayerPos(playerid, pInfo[playerid][PosX], pInfo[playerid][PosY], pInfo[playerid][PosZ]+1.5);
    SetPlayerFacingAngle(playerid, pInfo[playerid][PosAngle]);
    SetPlayerInterior(playerid, pInfo[playerid][Interior]);
    SetPlayerVirtualWorld(playerid, pInfo[playerid][VirtualWorld]);

    SendClientMessage(playerid, COLOR_GOV, "SERVER: {FFFFFF}Welcome to your last position.");

    if(pInfo[playerid][SkinID] == 0) return ShowModelSelectionMenu(playerid, skinlist, "Select Skin");
}
Still.
Reply


Messages In This Thread
OnPlayerSpawn (if, else if) - by Uberanwar - 15.09.2016, 16:31
Re: OnPlayerSpawn (if, else if) - by K0P - 15.09.2016, 17:03
Re: OnPlayerSpawn (if, else if) - by Uberanwar - 15.09.2016, 17:17
Re: OnPlayerSpawn (if, else if) - by Marricio - 15.09.2016, 17:24
Re: OnPlayerSpawn (if, else if) - by Uberanwar - 15.09.2016, 18:00
Re: OnPlayerSpawn (if, else if) - by Marricio - 15.09.2016, 18:38
Re: OnPlayerSpawn (if, else if) - by Rdx - 16.09.2016, 08:59
Re: OnPlayerSpawn (if, else if) - by JaKe Elite - 16.09.2016, 10:34

Forum Jump:


Users browsing this thread: 1 Guest(s)