How to make user 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)
+--- Thread: How to make user spawn? (
/showthread.php?tid=530550)
How to make user spawn? -
Jigsaw123 - 07.08.2014
Hey guys..
Basically.. I made this register thing, works fine, but when I logged in and entered my password, The screen stays the same and the dialog dissapears. Can someone tell me how to make the user spawn and how to set the setplayerpos? and also where to place it? Thank you!
Re: How to make user spawn? -
Jigsaw123 - 07.08.2014
Anyone know?
Re: How to make user spawn? -
ILOVEPAWNV - 07.08.2014
its very esay
can you do random spawns for player
i show you waht to do
Код:
new Float:RandomSpawn[][3] = {
{2508.4167,2123.1484,10.8405,359.6884},
{-2298.2058,158.5556,35.3125,42.6559},
{2828.1387,-1584.3601,13.6168,252.9279}
};
this random spawns im create in my gamemode can you copy this up up the mode
ok
go to OnPlayerSpawn
adn do it:
Код:
new Rand = random(sizeof(RandomSpawn));
SetPlayerPos(playerid,RandomSpawn[Rand][0],RandomSpawn[Rand][1],RandomSpawn[Rand][2]);
SetPlayerFacingAngle(playerid, RandomSpawn[Rand][3]);
done. its all , know all you do it start the server and its work!
you can add more
just add its
{X,Y,Z}
And Change 3 to 4 or 5 ..
all you want, have fun!
Re: How to make user spawn? -
[XST]O_x - 07.08.2014
https://sampwiki.blast.hk/wiki/SetSpawnInfo
https://sampwiki.blast.hk/wiki/SpawnPlayer
Re: How to make user spawn? -
Dignity - 07.08.2014
pawn Код:
// Inside of the login callback
SpawnPlayer(playerid);
// OnPlayerSpawn
public OnPlayerSpawn(playerid)
{
SetPlayerPos(playerid, x, y, z);
return true;
}
Re: How to make user spawn? -
Sawalha - 07.08.2014
You need to use OnDialogResponse, called when a dialog is being responsed.
pawn Код:
public OnPlayerDialogResponse(playerid, dialogid, listitem, inputtext[], response)
Put the dialog's ID,
check if he responsed
check if password was correct,
Use as they told you up ^
And onplayerspawn as ILOVEPAWN told you