How to make user spawn?
#1

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!
Reply
#2

Anyone know?
Reply
#3

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!
Reply
#4

https://sampwiki.blast.hk/wiki/SetSpawnInfo
https://sampwiki.blast.hk/wiki/SpawnPlayer
Reply
#5

pawn Код:
// Inside of the login callback
SpawnPlayer(playerid);

// OnPlayerSpawn
public OnPlayerSpawn(playerid)
{
    SetPlayerPos(playerid, x, y, z);
   
    return true;
}
Reply
#6

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 ^
pawn Код:
SpawnPlayer(playerid)
And onplayerspawn as ILOVEPAWN told you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)