Hello There, Guest! Login or Register


About Class Selection
#1
Well i think this is the only section where i can post my question so i ask...

I saw that LVP (when a player connect) check if that account exist, if so it skip the class selection right? And it spawns the player in the login room.

So i'd like to make a thing like that in my server too..
I've tried with a lot of things like
Code:
public OnPlayerRequestClass(playerid, classid)
{
    if(AccountExist)
    {
        SpawnPlayer(playerid);
                return 0;
    }
        else
       {
             //class selection
       }
return 1;
}

I've tried to change return 0 in return 1 and lot of stuff but nothing, i cannot skip tha class selection without making something wrong, and so i've tried to ask here...

So if you scripters can say how its in LVP i will be very grateful.

Regards, SKE92beyond :)

EDIT: OK :P i've just seen that there is a sub-sub-section called Scripting :+, i hope someone will move this topic :+
Reply
#2
Hai

http://pawn.pastebin.com/f30d79014

That should work.

Edit: the intendation isn't too great, but you can fix that yourself I guess.
Reply
#3
Well, I'm not the best of all the scripters here, but I'll try to help you. :)

I'd use dini for some kind of regestration, there you save something like PlayerSkin: [nr].(i do NOT know how dini works :P).
And when the player gets to Class selection, the server will load the file and the row with PlayerSkin:
And well, you'd need a variable to read the line. Then you can,
SetPlayerSkin(playerid,[Variable goes here]);

(sorry for not helping with any code, but as I don't know dini, I wouldn't know how to exactly do this, but I thought that some ideas might help as well ;))
Reply
#4
Code:
new PlayerFile[50], pName[24];
GetPlayerName(playerid, pName, sizeof(pName));
format(PlayerFile, sizeof(PlayerFile), "/users/%s.ini", pName);
    
if(dini_Int(PlayerFile, "SkinSet") == 1)
{
}
else
{
}

Something like that^
Reply
#5
(10-08-2009, 06:12 AM)Matthias link Wrote: Hai

http://pawn.pastebin.com/f30d79014

That should work.

Edit: the intendation isn't too great, but you can fix that yourself I guess.
Well thanks first of all because it works ;) then i need another help, with this sistemation first time i die i return to class selection ...how to avoid that again? :+
Reply
#6
Maybe you're using a variable wrong? I use the exact same and it works. Show me your code please :r
Reply
#7
(10-08-2009, 04:02 PM)Matthias link Wrote: Maybe you're using a variable wrong? I use the exact same and it works. Show me your code please :r
No one variable was wrong simply i made a control on the class selection and now everything goes... thanks man :+
Reply
#8
No problem
Reply