I am attempting to skip class selection, but it doesn't work -
EtayJ - 19.10.2017
PHP код:
public OnPlayerRequestClass(playerid, classid)
{
print("Request class!");
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
return 1;
}
forward InstantSpawn(playerid);
public InstantSpawn(playerid)
{
TogglePlayerSpectating(playerid, 0);
TogglePlayerControllable(playerid, 1);
SpawnPlayer(playerid);
}
public OnHashCheck(playerid)
{
//...... your typical password compare stuff
if(!match)
KickPlayer(playerid, "Wrong password!");
SetTimerEx("InstantSpawn", 1, 0, "i", playerid);
return 1;
}
I would love to get some help, I don't know what I am doing wrong (And before you ask, I did verify that OnHashCheck is being called);
Re: I am attempting to skip class selection, but it doesn't work -
kAn3 - 19.10.2017
PHP код:
OnPlayerConnect(playerid)
{
// ............. Code
return InstantSpawn(playerid);
}
Re: I am attempting to skip class selection, but it doesn't work -
EtayJ - 19.10.2017
Thanks but I still get the class selection screen.
Re: I am attempting to skip class selection, but it doesn't work -
Lucases - 19.10.2017
Код HTML:
public OnPlayerConnect(playerid)
{
SetSpawnInfo(playerid, ANYCORDS, ANYCORDS, ANYCORDS, ANYANGLE, -1, 0, -1, 0, -1, 0);
SpawnPlayer(playerid);
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
return 1;
}
I just made the player spawn under OnPlayerConnect, so OnPlayerRequestClass won't be called.
This will prevent "Spawn" button show.
Replace all "ANYCORDS" with any cords, anyway you'll set the player pos after the spawn with this code.
Remember to change player pos and to set the camera behind the player after login/register dialog.
I hope I helped you.
Re: I am attempting to skip class selection, but it doesn't work -
EtayJ - 19.10.2017
Thanks guys.