How to skip skin selection -
Zafire1410 - 05.08.2010
Hi, i need if someone is registered and spawned not apperas class selection... something like this
Код:
if(pinfo[playerid][spawned] == 1)
{
skippp class selection
}
Re: How to skip skin selection -
RyDeR` - 05.08.2010
Put under OPRQ:
SpawnPlayer(playerid);
Re: How to skip skin selection -
[XST]O_x - 05.08.2010
pawn Код:
public OnPlayerRequestClass(playerid,classid)
{
if(pinfo[playerid][loggedin] == 1) // Checks if the player is registered
{
SpawnPlayer(playerid);
return 1;
}
return 1;
}
Re: How to skip skin selection -
Hiddos - 05.08.2010
@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
Re: How to skip skin selection -
[XST]O_x - 05.08.2010
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?
Re: How to skip skin selection -
Kar - 05.08.2010
onplayerconnect
3 ways.
spam /login pass
dialog login
autologin
Re: How to skip skin selection -
Zafire1410 - 05.08.2010
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;
}
Re: How to skip skin selection -
Hiddos - 05.08.2010
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
Re: How to skip skin selection -
Kar - 05.08.2010
pawn Код:
pinfo[playerid][spawned] == 1
checks if ur registered? seriously? wtf are you sure?
Re: How to skip skin selection -
Zafire1410 - 05.08.2010
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