Spawning a player after death
#1

pawn Код:
if (PlayerInfo[playerid][pFac] == 1)//PCPD Spawn
            {
                if(PlayerInfo[playerid][pHospital])
                {
                    Hospital[playerid] = random(2);
                    if(Hospital[playerid] == 0)
                    {
                        SetPlayerPos(playerid, 2253.0479,360.5177,11.5480);
                        SetPlayerCameraPos(playerid,2249.8252,101.2665,41.2377);
                        SetPlayerCameraLookAt(playerid,2270.3330,82.0429,30.0284);
                        ResetZaiatWeapons(playerid);
                        PlayerInfo[playerid][pFacDuty] = 0;
                        SetPlayerInterior(playerid, 0);
                        SetPlayerVirtualWorld(playerid, 0);
                        TogglePlayerControllable(playerid, 0);
                        HospitalTime[playerid] = 30;
                        if(PlayerInfo[playerid][pVIP] >= 2) HospitalTime[playerid] = 1;
                        HospitalCountDown[playerid] = SetTimerEx("HospitalTimer", 1000, false, "d", playerid);
                    }
                    else if(Hospital[playerid] == 1)
                    {
                        SetPlayerPos(playerid, 2253.0479,360.5177,11.5480);
                        SetPlayerCameraPos(playerid,2249.8252,101.2665,41.2377);
                        SetPlayerCameraLookAt(playerid,2270.3330,82.0429,30.0284);
                        ResetZaiatWeapons(playerid);
                        PlayerInfo[playerid][pFacDuty] = 0;
                        SetPlayerInterior(playerid, 0);
                        SetPlayerVirtualWorld(playerid, 0);
                        TogglePlayerControllable(playerid, 0);
                        HospitalTime[playerid] = 30;
                        if(PlayerInfo[playerid][pVIP] >= 2) HospitalTime[playerid] = 1;
                        HospitalCountDown[playerid] = SetTimerEx("HospitalTimer", 1000, false, "d", playerid);
                    }
                }
                for(new i = 0; i < 13; i++)
                if(PlayerInfo[playerid][pWeapon][i]) GiveZaiatWeapon(playerid, PlayerInfo[playerid][pWeapon][i], PlayerInfo[playerid][pWeaponAmmo][i]);
                SetPlayerInterior(playerid,6);
                SetPlayerVirtualWorld(playerid,0);
                SetPlayerPos(playerid,255.2517,66.6187,1003.6406);
                SetPlayerHealth(playerid, 100);
                SetPlayerArmour(playerid, 0);
                SetPlayerSkin(playerid,PlayerInfo[playerid][pModel]);
                return 1;
            }
When a player die he has the camera position on the hospital but it doesnt appear (the hospital) because of different interior and when players spawn the interior is right, i don't know how to fix it, help me please.
Reply
#2

tried using SetPlayerInterior ?
Reply
#3

Do you see the script? I used it!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)