Disable Class Selection - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Disable Class Selection (
/showthread.php?tid=591307)
Disable Class Selection -
Axel712 - 10.10.2015
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
Re: Disable Class Selection -
jlalt - 10.10.2015
https://sampforum.blast.hk/showthread.php?tid=574072
Re: Disable Class Selection -
ZeMuNaC - 10.10.2015
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;
}
Re: Disable Class Selection -
Axel712 - 10.10.2015
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