Disable Class Selection
#1

So i made a register/login system and it still needs me to press the spawn button,i entered
Код:
public OnPlayerRequestClass(playerid, classid)
{
	SpawnPlayer(playerid);
	return 1;
}
But it still does not work,any help?Will give +rep
Reply
#2

https://sampforum.blast.hk/showthread.php?tid=574072
Reply
#3

Try this code.
Код:
public OnPlayerRequestSpawn( playerid )
{
    return 1; // You must return 1 to do this. 
}
Код:
public OnPlayerRequestClass( playerid, classid )
{
    return 0; // Skipping the class request
}
Код:
public OnPlayerSpawn( playerid )
{
    SetPlayerSkin( playerid, 0 ); // Example
    SetPlayerPos( playerid, 0.0, 0.0, 0.0 );
    return 1;
}
If this is not working out then you can try.
Код:
public OnPlayerConnect(playerid)
{
     SetSpawnInfo(...); //Fill this in
     SpawnPlayer(playerid);
     return 1;
}
Reply
#4

Quote:
Originally Posted by ZeMuNaC
Посмотреть сообщение
Try this code.
Код:
public OnPlayerRequestSpawn( playerid )
{
    return 1; // You must return 1 to do this. 
}
Код:
public OnPlayerRequestClass( playerid, classid )
{
    return 0; // Skipping the class request
}
Код:
public OnPlayerSpawn( playerid )
{
    SetPlayerSkin( playerid, 0 ); // Example
    SetPlayerPos( playerid, 0.0, 0.0, 0.0 );
    return 1;
}
It worked,thanks!+Rep
Reply


Forum Jump:


Users browsing this thread: