How to skip skin selection
#1

Hi, i need if someone is registered and spawned not apperas class selection... something like this

Код:
if(pinfo[playerid][spawned] == 1)
{
     skippp class selection
}
Reply
#2

Put under OPRQ:
SpawnPlayer(playerid);
Reply
#3

pawn Код:
public OnPlayerRequestClass(playerid,classid)
{
    if(pinfo[playerid][loggedin] == 1) // Checks if the player is registered
    {
        SpawnPlayer(playerid);
        return 1;
    }
    return 1;
}
Reply
#4

@O_x: It doesn't always checks that, just in your case. I'm also wondering why not changing it to 'logged' instead of 'registered', what's a 'registered' variable gonna do without knowing if it's the real man or just a faker
Reply
#5

Quote:
Originally Posted by Hiddos
Посмотреть сообщение
@O_x: It doesn't always checks that, just in your case. I'm also wondering why not changing it to 'logged' instead of 'registered', what's a 'registered' variable gonna do without knowing if it's the real man or just a faker
Sorry,my bad edited it.
But how can a player be logged in before getting to the class selection?
Reply
#6

onplayerconnect

3 ways.

spam /login pass

dialog login

autologin
Reply
#7

Thx but if spawned.. the player dont spawn appears down "<< >> spawn" here is my code

i want spawn automatically if spawned == 1!!

another thing.. is a rp server so when player connect appears login or register dialog..

Код:
public OnPlayerRequestClass(playerid, classid)
{
	if(pinfo[playerid][spawned] == 1) // Checks if the player is registered
    {
        SpawnPlayer(playerid);
        return 1;
    }
    else
    {
        SetupPlayerForClassSelection(playerid);
    }
	return 1;
}
Reply
#8

Quote:
Originally Posted by [XST]O_x
Посмотреть сообщение
Sorry,my bad edited it.
But how can a player be logged in before getting to the class selection?
Auto log-in might work, I didn't even thought of that 0.o
Reply
#9

pawn Код:
pinfo[playerid][spawned] == 1
checks if ur registered? seriously? wtf are you sure?
Reply
#10

I dont want check if registered!! what i want to du is this..

I am a new player.. i connect in the server i register.. now appears class selection i select mi skyn.. for example: 45..

now when i logout!! i enter again to the server.. but i dont want appears again class selection.. i want player spawn with skin 45!! or what skin he select.. i make this

onplayerspawn

Код:
    if(pinfo[playerid][spawned] == 0)
    {
        new pskin;
        pskin = GetPlayerSkin(playerid);
	    MysqlUpdateCampoInt("jugadores", "nombre", pnombre, "spawned", 1);
	    MysqlUpdateCampoInt("jugadores", "nombre", pnombre, "skin", pskin);
    }
	else
	{
	    SetPlayerSkin(playerid, pinfo[playerid][skin]);
	}
ofcourse if i select another skin.. when spawn i appears with 45 the first skin i select on register!!..

but i dont whant appears class selection.. i want spawn automatic
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)