Player doesnt spawns
#1

Fixed. - - -- - -
Reply
#2

show me your public OnPlayerRequestClass and public OnGameModeInit()
Reply
#3

Request Class

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    PlayerInfo[playerid][pModel] = Peds[classid][0];
    if(IsPlayerNPC(playerid))
    {
        SpawnPlayer(playerid);
        return 1;
    }
    if (RegistrationStep[playerid] == 0 && gPlayerLogged[playerid] != 1)
    {
        ClearChatbox(playerid, 10);
        ShowPlayerDialog(playerid, 1244, DIALOG_STYLE_MSGBOX,"UK:RP Information","{B35959}Server Information \n\n{00FF00}Server IP: {FFD90F}78.129.221.58 {00FF00}Port: {FFD90F}7799 \n\n{00FF00}Server Website: {FFD90F}http://www.uk-rp.co.uk/ \n\n{00FF00}Server TeamSpeak: {FFD90F}146.185.28.163:7930","Continue","Quit");
        PlayerInfo[playerid][pModel] = Peds[classid][0];
        SetPlayerTeamFromClass(playerid,classid);
        SendClientMessage(playerid, COLOR_LIGHTBLUEGREEN, "  Please Note: We do not give refunds to begginers.");
        SendClientMessage(playerid, COLOR_BLUE, "________________________________________________________");
        SendClientMessage(playerid, COLOR_RED, "             Welcome To Official UK:RP");
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "      Welcome To The UK-RP SA-MP Server");
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "      Community Owner: Jake_Tierra");
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "      Server Scripters: Jake_Tierra & Leroy_Hudson");
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "      Server Co-Owner: Mark_Sanchez");
        SendClientMessage(playerid, COLOR_BLUE, "_________________________________________________________");
        SendClientMessage(playerid, COLOR_LIGHTBLUEGREEN, "You will be asked to register/login soon.");
        SendClientMessage(playerid, COLOR_LIGHTBLUEGREEN, "Please wait...Files loading...");
    }
    else
    {
        SpawnPlayer(playerid);
    }
    return false;
}

GameModeInit

pawn Код:
public OnGameModeInit()
{
    ShowPlayerMarkers(2);
    LimitPlayerMarkerRadius(10);

    grovestreet = GangZoneCreate(2220.01, -1733.182, 2528.039, -1654.228);
   
    LoadVehicles();
    LoadDealerships();
    LoadFuelStations();

    for(new i=0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            OnPlayerConnect(i);
        }
    }
    for(new i=1; i < MAX_DVEHICLES; i++)
    {
        UpdateVehicle(i, 0);
    }
    for(new i=1; i < MAX_DEALERSHIPS; i++)
    {
        UpdateDealership(i, 0);
    }
    for(new i=1; i < MAX_FUEL_STATIONS; i++)
    {
        UpdateFuelStation(i, 0);
    }

    maintimer = SetTimer("MainTimer", 1000, true);
    speedotimer = SetTimer("Speedometer", 555, true);
    savetimer = SetTimer("SaveTimer", 2222, true);
        return 1;
}
Reply
#4

You can't use SpawnPlayer in OnPlayerRequestClass. Set a 1 milisecond timer and SpawnPlayer() in there.
Reply
#5

Quote:
Originally Posted by MP2
Посмотреть сообщение
You can't use SpawnPlayer in OnPlayerRequestClass. Set a 1 milisecond timer and SpawnPlayer() in there.
It was always working before why it didnt just when I put some new things?
Reply
#6

I don't know? SpawnPlayer has never worked for me under OnPlayerRequestClass.
Reply
#7

I just copied everything from a filterscript to the gamemode to put it together what have I done wrong? :S
Reply
#8

Use
pawn Код:
SetSpawnInfo(playerid, team, skin, Float:x, Float:y, Float:z, Float:Angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo)
before
pawn Код:
SpawnPlayer
Reply
#9

That's not the problem exactly because it never have done it before. I added a new filterscript and copied everything from it and put them in the gamemode.pwn and it stops at the request class.
Reply
#10

Show your public OnPlayerRequestSpawn, it is probably returning 0.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)