SPAwn pLaCe - 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: SPAwn pLaCe (
/showthread.php?tid=589834)
SPAwn pLaCe -
sayaunta - 23.09.2015
Код:
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 2495.1035,-1686.8220,13.5141);
SetPlayerFacingAngle(playerid,5.0929);
SetPlayerCameraPos(playerid, 2494.3730,-1679.2714,13.5731);
SetPlayerCameraLookAt(playerid, 2495.1035,-1686.8220,13.5141);
return 1;
}
wat wrog
i still spawn at lv elevator
Re: SPAwn pLaCe -
Aly - 23.09.2015
Put those lines under OnPlayerSpawn
Re: SPAwn pLaCe -
sayaunta - 23.09.2015
oh ok
Re: SPAwn pLaCe -
sayaunta - 23.09.2015
tq its work...hmm u know how to spawn like death mach...if i die at dat circle ...ill spawn also at dat circle but other xyz
Re: SPAwn pLaCe -
Aly - 23.09.2015
Yeah
Quote:
new FloatLast[MAX_PLAYERS][3],pLastInt[playerid];
|
Under OnPlayerDeath put this
Quote:
GetPlayerPos(playerid, pLast[playerid][0], pLast[playerid][1], pLast[playerid][2]);
pLastInt[playerid] = GetPlayerInterior(playerid);
|
At the end of OnPlayerSpawn put:
Quote:
if(pLast[playerid][0] != 0.0)
{
SetPlayerInterior(playerid, pLastInt[playerid]);
SetPlayerPos(playerid, pLast[playerid] [0], pLast[playerid][1], pLast[playerid][2]);
}
|
And under OnPlayerConnect
Quote:
for(new i=0;i < 3;i++)
plast[playerid][i] = 0.0;
pLastInt[playerid] = 0;
|
There might be some typing issues I wrote the code on my phone.
Re: SPAwn pLaCe -
sayaunta - 23.09.2015
TQ...