Help with loading / saving system.
#1

Hello,

I'm a beginner scripter, I followed Kush's login/account system, and I'm trying to add in a system to skip the class selection screen and just spawn in the player after he/she registered or logged in, and have their skin set to what it was previously, or if they're just registering, set to a default skin.

I have no clue how to skip to skin selector screen even after googling it
Code:
 spawnplayer(playerid)
does not seem to work and when I did get it to work it spawned me out in blueberry and idk where to add in the spawn location, I do have the skin saving system set, but I can't figure out how to open up the y_ini file, get the skin ID from that and use it.

I've tried this and it doesn't work
Code:
SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin])
Skip class selection screen and spawn: No clue how to do
Save skin on disconnect: Got it.
Setskin to what was saved on login: No clue how to fix it
Reply
#2

you need to remove
pawn Code:
public OnPlayerRequestClass(playerid, classid)
OR

pawn Code:
public SetupPlayerForClassSelection(playerid)
from your script then make a system like when player connect then show a dialog to register or login
Reply
#3

Quote:
Originally Posted by IceBilizard
View Post
you need to remove
pawn Code:
public OnPlayerRequestClass(playerid, classid)
OR

pawn Code:
public SetupPlayerForClassSelection(playerid)
from your script then make a system like when player connect then show a dialog to register or login
So I removed
pawn Code:
public OnPlayerRequestClass(playerid, classid)
and it seems like it did something, but it didn't remove the spawn button, I add in
pawn Code:
SpawnPlayer(playerid);
to after someone logs in, and it still doesn't spawn me, I'm not quite sure what to do. I still am yet to get anywhere with loading and setting the skin aswell upon spawning
Reply
#4

why you don't create a dialog system when player connect if not register then show dialog for register after register setplayerpos with a random location after register if player log out then save his locations with dini or y_ini functions
then if player again re-connect and registered then show login dialog and on login dialog set player position which you saved on player disconnect
Reply
#5

Quote:
Originally Posted by IceBilizard
View Post
you need to remove
pawn Code:
public OnPlayerRequestClass(playerid, classid)
OR

pawn Code:
public SetupPlayerForClassSelection(playerid)
from your script then make a system like when player connect then show a dialog to register or login
Quote:
Originally Posted by IceBilizard
View Post
why you don't create a dialog system when player connect if not register then show dialog for register after register setplayerpos with a random location after register if player log out then save his locations with dini or y_ini functions
then if player again re-connect and registered then show login dialog and on login dialog set player position which you saved on player disconnect
I already have all of that, but the player needs to be spawned for me to be able to setpos, and idk how to do that because "spawnplayer(playerid);" is not working.
Reply
#6

Post your script here or PM i will fix it
Reply
#7

I fixed it, I had to add in the "SetSpawnInfo" before "SpawnPlayer(playerid);"
Reply
#8

ok that is good enjoy
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)