SKIP OnPlayerReauestClass & F4 button - 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: SKIP OnPlayerReauestClass & F4 button (
/showthread.php?tid=373433)
SKIP OnPlayerReauestClass & F4 button -
sanya_gnoy - 30.08.2012
Hello, sorry for my bad english.
I have one question: how to skip class selection at a connection and a request to classs selection by pressing F4? Do not tell me that we can not, because I've seen it on some servers.
some code (it worked before, not now

)
PHP код:
public OnPlayerConnect(playerid, classid)
{
SetSpawnInfo( playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0 );
}
public OnPlayerRequestClass(playerid, classid)
{
SpawnPlayer(playerid);
}
Re: SKIP OnPlayerReauestClass & F4 button -
C00K13M0N$73R - 30.08.2012
TogglePlayerSpectating(playerid,1);
set a timer
TogglePlayerSpectating(playerid,0);
SKIP OnPlayerReauestClass & F4 button -
sanya_gnoy - 30.08.2012
Quote:
Originally Posted by C00K13M0N$73R
TogglePlayerSpectating(playerid,1);
set a timer
TogglePlayerSpectating(playerid,0);
|
ok, thanks. now F4 button problem.
Re: SKIP OnPlayerReauestClass & F4 button -
playbox12 - 30.08.2012
You can't stop the button from being pressed. Just make sure you have TogglePlayerSpectating under OnPlayerRequestClass and it'll prevent the player from ever entering class selection. (even after they died).
Make sure you turn TogglePlayerSpectating off at OnPlayerSpawn or somewhere else, otherwise you'll always be in spectating mode.