Jump to content
  • 0

pomoc Pozice pri prihlaseni + ukladani pozice


eRko16

Dotaz

Zdravim lidi potreboval bych ze kdyz se hrac napoji poprve na server, zaregistruje se a pak prihlasi tak mu to nastavi souradnice 1682.8743,-2246.6028,13.5491 a kdyz uz se pripoji a prihlasi po druhe tak mu to nastavi souradnice na kterych se odpojil.

 

Registraci mam pres dialog

Link to comment
Share on other sites

18 odpovědí na tuto otázku

Recommended Posts

  • 0
Guest [BJ]boban88

ok takze do disconectu:

new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
dUserSetINT(PlayerName(playerid)).("x",floatround(x));
dUserSetINT(PlayerName(playerid)).("y",floatround(y));
dUserSetINT(PlayerName(playerid)).("z",floatround(z));

 

a do loginu :

SetPlayerPos(playerid,
float(dUserINT(PlayerName(playerid)).("x")),
float(dUserINT(PlayerName(playerid)).("y")),
float(dUserINT(PlayerName(playerid)).("z")));

to je vsetko a ukladanie tu je daj hladat nabuduce :v:

Link to comment
Share on other sites

  • 0

public OnPlayerSpawn(playerid)

{

if (PLAYERLIST_authed[playerid])

{

SetPlayerPos(playerid,

float(dUserINT(PlayerName(playerid)).("x")),

float(dUserINT(PlayerName(playerid)).("y")),

float(dUserINT(PlayerName(playerid)).("z")));

}

SetPlayerFacingAngle(playerid,181.0372); //Uhel otoceni postavy

//SetPlayerPos(playerid,1682.8743,-2246.6028,13.5491); //Pozice postavy

//SetPlayerColor(playerid, BARVA_BILA);

//new randSkin = random(sizeof(Tototudufamnebude));

//SetPlayerSkin(playerid,Tototudufamnebude[randSkin]);

PlayerPlaySound(playerid,1063,0.0,0.0,0.0);

return 1;

}

Link to comment
Share on other sites

  • 0
Guest [BJ]boban88

public OnPlayerSpawn(playerid)

{

if (PLAYERLIST_authed[playerid])

{

SetPlayerPos(playerid,

float(dUserINT(PlayerName(playerid)).("x")),

float(dUserINT(PlayerName(playerid)).("y")),

float(dUserINT(PlayerName(playerid)).("z")));

}

SetPlayerFacingAngle(playerid,181.0372); //Uhel otoceni postavy

//SetPlayerPos(playerid,1682.8743,-2246.6028,13.5491); //Pozice postavy

//SetPlayerColor(playerid, BARVA_BILA);

//new randSkin = random(sizeof(Tototudufamnebude));

//SetPlayerSkin(playerid,Tototudufamnebude[randSkin]);

PlayerPlaySound(playerid,1063,0.0,0.0,0.0);

return 1;

}

 

to float som ti povedal ze do loginu

Link to comment
Share on other sites

  • 0

To je prave blbost

 

Cituji OM3NA

je hovadina to davat do OnPlayerLogin...dej to do OnPlayerSpawn pod podminku ze se prave prihlasil...ptz kdyz to das do loginu tak ho to tam hodi kdyz se prihlasi...ale kdyz se chce spawnout tak ho to hodi uplne jinam

Link to comment
Share on other sites

  • 0
Guest [BJ]boban88

ok sry to som si nevsimol tak potom mas niekde v mode SetPlayerPos mimo nejakeho prikazu a sa to miesa alebo nwm lebo stymto som vzivote problemy nemal

Link to comment
Share on other sites

  • 0

Takze vsechno mi funguje jako ukladani pozice, jedine co uz chci je aby pri prvnim prihlaseni byla pozice tahle, proste jen poprve! 1682.8743,-2246.6028,13.5491

Link to comment
Share on other sites

  • 0
Guest [BJ]boban88

no premyslal som nadtym a jedine co ma napada je

 

nedavaj tam ziadne ine Setplayerpos nechaj tam iba to float........

 

ale sprav si nasledovne :

medzi new:

new novy[MAX_PLAYERS];

 

do registru si daj:

novy[playerid] = 1;

 

a do OnPlayerSpawn

if (novy[playerid] == 1)

{

SetPlayerPos(playerid,tvoje suradky);

}

nic ine ma teraz nenapada som unaveny moc nato :d

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...