Got a solution...?
#5

Quote:
Originally Posted by Calgon
Посмотреть сообщение
Have you tried using the spectator mode in before OnPlayerSpawn?
You mean using TogglePlayerSpectating? If so, where would I put that function? With such short time between OnPlayerDeath and OnPlayerSpawn, isn't it pretty pointless (or could I use a timer)?

---

By the way, this is what I'm talking about:



This is the code under OnPlayerSpawn now:

pawn Код:
public OnPlayerSpawn(playerid)
{
    if(GetPVarInt(playerid, "JustDied") == 1)
    {
        ClearChat(playerid);
        OOCEnabled[playerid] = 0;
        SendClientMessage(playerid, COLOR_LRED, "You have been transported to the hospital and can't remember what happened to you.");
        SetPlayerCameraLookAt(playerid, -2327.4072, 1357.9125, 334.0528);
        SetPlayerVirtualWorld(playerid, randomEx(30, 500));
        defer HospitalTimer(playerid);
        SetPVarInt(playerid, "INHOSP", 1);
        DeletePVar(playerid, "JustDied");
    }

    TextDrawShowForPlayer(playerid, TimeTD);
    TextDrawShowForPlayer(playerid, CompleteDate);
    TextDrawShowForPlayer(playerid, ServerVersionTD);
   
    PreloadAnimLib(playerid, "BOMBER");
    PreloadAnimLib(playerid, "RAPPING");
    PreloadAnimLib(playerid, "SHOP");
    PreloadAnimLib(playerid, "BEACH");
    PreloadAnimLib(playerid, "SMOKING");
    PreloadAnimLib(playerid, "ON_LOOKERS");
    PreloadAnimLib(playerid, "DEALER");
    PreloadAnimLib(playerid, "CRACK");
    PreloadAnimLib(playerid, "CARRY");
    PreloadAnimLib(playerid, "COP_AMBIENT");
    PreloadAnimLib(playerid, "PARK");
    PreloadAnimLib(playerid, "INT_HOUSE");
    PreloadAnimLib(playerid, "FOOD");
    PreloadAnimLib(playerid, "GANGS");
    PreloadAnimLib(playerid, "PED");
    PreloadAnimLib(playerid, "FAT");
    return 1;
}
EDIT: BLAH. I forgot to remove "return 0;" one second...

EDIT 2: Okay, the code above is accurate. However, the whole OnPlayerSpawn function isn't being called now...

EDIT 3: Now after removing the code from OnPlayerSpawn, and placing it back under OnPlayerRequestClass, OnPlayerSpawn is still not being called.
Reply


Messages In This Thread
Got a solution...? - by Scenario - 18.12.2011, 04:50
Re: Got a solution...? - by Calgon - 18.12.2011, 04:52
Re: Got a solution...? - by Scenario - 18.12.2011, 05:00
Re: Got a solution...? - by Calgon - 18.12.2011, 05:03
Re: Got a solution...? - by Scenario - 18.12.2011, 05:06
Re: Got a solution...? - by Scenario - 18.12.2011, 05:30
Re: Got a solution...? - by Calgon - 18.12.2011, 06:02
Re: Got a solution...? - by Scenario - 18.12.2011, 19:58
Re: Got a solution...? - by Scenario - 18.12.2011, 21:08
Re: Got a solution...? - by Scenario - 18.12.2011, 22:57

Forum Jump:


Users browsing this thread: 1 Guest(s)