Setting auto spawn - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Setting auto spawn (
/showthread.php?tid=192871)
Setting auto spawn -
Anthonyx3' - 24.11.2010
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
Re: Setting auto spawn -
cessil - 24.11.2010
where's the code under? try putting it under OnPlayerRequestClass
Re: Setting auto spawn -
Anthonyx3' - 24.11.2010
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!");
Re: Setting auto spawn -
Leeroy. - 24.11.2010
Код:
OnPlayerRequestClass { SpawnPlayer(playerid) return true; }
Re: Setting auto spawn -
GaGlets(R) - 24.11.2010
Maybe this is kinda bug or what but you Must use
SetSpawnInfo before spawning someone. i dealed with that problem too.
Re: Setting auto spawn -
Anthonyx3' - 24.11.2010
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
Re: Setting auto spawn -
Kitten - 24.11.2010
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;
}
Re: Setting auto spawn -
Leeroy. - 24.11.2010
Solved this problem.