Class selection skipping problem - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Class selection skipping problem (
/showthread.php?tid=248154)
Class selection skipping problem -
JackYack13 - 12.04.2011
I have this code to skip class selection:
pawn Код:
new SkinSkipTimer[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
KillTimer(SkinSkipTimer[playerid]);
SkinSkipTimer[playerid] = SetTimerEx("SkipClass", 100, 0, "i", playerid);
}
forward SkipClass(playerid);
public SkipClass(playerid)
{
SetSpawnInfo(playerid, 0, Skin[playerid], 1959.8774, 1343.1293, 16.0, 270.0, 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
KillTimer(SkinSkipTimer[playerid]);
}
But then after the first time I die, it shows me the class selection screen even though I never pressed F4. Also, it only does it after the first death, because later it doesn't show me class selection after dying.
So how can I fix it so that it doesn't show me that class selection after I die UNLESS i press F4? (i don't want it to totally remove class selection.. only when the player connects or dies without pressing F4)
Re: Class selection skipping problem -
Seven_of_Nine - 12.04.2011
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
SpawnPlayer(playerid);
return 1;
}
This should help cause if you say when you die you go to class selection, this should spawn you anyways..
Re: Class selection skipping problem -
JackYack13 - 12.04.2011
Quote:
Originally Posted by Seven_of_Nine
pawn Код:
public OnPlayerDeath(playerid, killerid, reason) { SpawnPlayer(playerid); return 1; }
This should help cause if you say when you die you go to class selection, this should spawn you anyways.. 
|
But what if the player pressed F4 before death? Then he also wouldn't be able to go to class selection... But that's not what I want.
// EDIT:
NVM lol