SA-MP Forums Archive
Is this possible? - 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: Is this possible? (/showthread.php?tid=483274)



Is this possible? - ZBits - 25.12.2013

Hello, just a small question...


Is it possible to disable the F4 thingy? which makes you go back to class selection.


Re: Is this possible? - ikey07 - 25.12.2013

spawn the player whenever he request a class.


Re: Is this possible? - ZBits - 25.12.2013

Tried this but it doesnt work.

Under OnPlayerRequestClass:
pawn Код:
if(pInfo[playerid][Logged] == 1)
{
SpawnPlayer(playerid);
SendClientMessage(playerid,COLOR_PINK2,"Error: This function is Disabled");
}



AW: Is this possible? - Nero_3D - 25.12.2013

Explain what happens / what doesn't happen

If the player is logged in he already has a class, blabla, so the code should work in OnPlayerRequestClass
You need to place that at top of the public and add a return at the end

If you additionall want to disable to message (if you press F4) just put ForceClassSelection in OnPlayerSpawn


Re: Is this possible? - ZBits - 25.12.2013

When the code is applied to OnPlayerRequestClass, and in game when the player does F4 and /kill it still takes the player to the Class selection.


AW: Is this possible? - Nero_3D - 25.12.2013

Delay the SpawnPlayer with a timer, mostly happens because OnPlayerRequestClass is called before the internal sa-mp code


Re: Is this possible? - ZBits - 25.12.2013

Fixed Anways. Had to set the players logged status to 0 on disconnect