Setting auto spawn
#1

Hey guys im working on my rp from scratch project and i want it to make player spawn when they login, i placed spawnplayer(playerid); but it wont work, can anyone help?

pawn Код:
new skinarray = dini_Int(file, "Skin");
            SpawnPlayer(playerid);
            gPlayerLogged[playerid] = 1;
This is what i have, im trying to bypass the < > spawn. thanks in advance
Reply
#2

where's the code under? try putting it under OnPlayerRequestClass
Reply
#3

basically stat stuff

pawn Код:
new skinarray = dini_Int(file, "Skin");
            SpawnPlayer(playerid);
            gPlayerLogged[playerid] = 1;
           
           
            PlayerInfo[playerid][pAdminLevel] = dini_Int(file, "AdminLevel"); // This reads the dini and sets the player admin level //
           
            SetPlayerScore(playerid, PlayerInfo[playerid][pScore]);
           
            GivePlayerMoney(playerid, dini_Int(file, "Money")-GetPlayerMoney(playerid));
           
            /* Add all other eunms here please */
           
            SendClientMessage(playerid,COLOR_RED, "[IMMIGRATION] Hey Kid, Welcome Back!");
Reply
#4

Код:
OnPlayerRequestClass { SpawnPlayer(playerid) return true; }
Reply
#5

Maybe this is kinda bug or what but you Must use SetSpawnInfo before spawning someone. i dealed with that problem too.
Reply
#6

Imo, setspawninfo doesn't really make sense to me. I am making a roleplay gm btw, so setting random skins doesn't really help. when player logins i want them to have their last skin
Reply
#7

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    SetTimer("Wooo",2000,false);// 2 seconds it will spawn u
    return 1;
}
forward Wooo(playerid);
public Wooo(playerid)
{
  new skinarray = dini_Int(file, "Skin");
            SpawnPlayer(playerid);
            gPlayerLogged[playerid] = 1;
    return 1;
}
Reply
#8

Solved this problem.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)