always spawning at 0.0, 0.0, 0.0 on register and login. - 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: always spawning at 0.0, 0.0, 0.0 on register and login. (
/showthread.php?tid=361389)
always spawning at 0.0, 0.0, 0.0 on register and login. -
Why - 20.07.2012
Hello there. I am scripting a roleplay server from scratch, and I have run into a problem when registering and logging in.
This is my current registration code:
pawn Код:
new hashpass[129];
WP_Hash(hashpass,sizeof(hashpass),inputtext);
new INI:file = INI_Open(Path(playerid));
INI_SetTag(file,"Data");
INI_WriteString(file,"Password",hashpass);
INI_WriteInt(file,"Admin",0);
INI_WriteInt(file,"Donator",0);
INI_WriteInt(file,"Money",1000);
INI_WriteInt(file,"Level",1);
INI_WriteInt(file,"Kills",0);
INI_WriteInt(file,"Deaths",0);
INI_WriteInt(file,"Skin",299);
INI_WriteFloat(file,"Health",100);
INI_WriteFloat(file,"Armor",0);
INI_WriteFloat(file,"PosX",1779.69);
INI_WriteFloat(file,"PosY",-1937.75);
INI_WriteFloat(file,"PosZ",13.55);
INI_Close(file);
SetSpawnInfo(playerid, 0, pInfo[playerid][pSkin], 1779.69, -1937.75, 13.55, 30, 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
SendClientMessage(playerid,-1,"You have been successfully registered.");
However, when I register, this happens:
Re : always spawning at 0.0, 0.0, 0.0 on register and login. -
DeeCaay - 20.07.2012
When you're registering it's redirect you to the requestclass. Try something like that
SetPlayerPos(playerid,''POS HERE''); I know it's a problem with the requestclass if you don't see your character moving or anything.
Re: always spawning at 0.0, 0.0, 0.0 on register and login. -
Why - 20.07.2012
Thank you. Fixed.