Spawning isn't working? - 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)
+--- Thread: Spawning isn't working? (
/showthread.php?tid=432509)
Spawning isn't working? -
EliteApple - 22.04.2013
For some reason, after I login to my new script/server, it'll just make the dialog disappear, and not spawn my character.
Part of the code where it spawnsplayer;
pawn Код:
new string[64];
format(string, sizeof(string), "~w~Welcome ~n~~y~ %s",GetPlayerNameEx(playerid));
GameTextForPlayer(playerid, string, 3500, 1);
format(string, sizeof(string), "SERVER: Welcome %s",GetPlayerNameEx(playerid));
SendClientMessage(playerid, COLOR_WHITE, string);
SpawnPlayer(playerid);
gPlayerLogged[playerid] = 1;
OnPlayerSpawn:
pawn Код:
public OnPlayerSpawn(playerid)
{
if(PlayerInfo[playerid][pSpawnPoint] == 0)
{
Wounded[playerid] = 0;
SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
SetPlayerPos(playerid,1742.8767,-1863.5521,13.5749);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
SetPlayerFacingAngle(playerid,0);
SetPlayerHealth(playerid,100);
gPlayerLogged[playerid] = 1;
}
return 1;
}
What's wrong? I honestly do not know.
Re: Spawning isn't working? -
jakejohnsonusa - 22.04.2013
Well does your player's spawn point equal 0?
Re: Spawning isn't working? -
EliteApple - 22.04.2013
Yeah, you know when you join a server it shows the two arrows and the spawn button? When a player logs in, it should automatically spawn them, yet I have to hit the spawn button.