SA-MP Forums Archive
class selection screen - 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 screen (/showthread.php?tid=191786)



class selection screen - armyoftwo - 20.11.2010

When i die it instantly goes to class selection screen, how can i disable that?


Re: class selection screen - WillyP - 20.11.2010

Don't press f4?


This forum requires that you wait 120 seconds between posts. Please try again in 89 seconds.


This forum requires that you wait 120 seconds between posts. Please try again in 28 seconds.


Re: class selection screen - armyoftwo - 20.11.2010

i dont press F4?


Re: class selection screen - knackworst - 20.11.2010

If you press f4 you automaticly go to class selection when you die...

If you don't press f4 and it still happends, go into your script and go to onPlayerDeath, and show me what is there


Re: class selection screen - armyoftwo - 20.11.2010

there's nothing wrong in onplayerdeath if i anyways remove all code from it, it still shows the selection screen.
anyways
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
	new Float:X, Float:Y, Float:Z;
	
	GetPlayerPos(playerid, X, Y, Z);
	
	SetPlayerPos(playerid, X, Y, Z);
    TogglePlayerControllable(playerid, false);
    
    ApplyAnimation(playerid,"KNIFE","KILL_Knife_Ped_Die",1,0,0,0,0,0);
    
	SendClientMessage(playerid, COLOR_LIGHTRED, "You have fallen unconscious, but there's a chance that you'll die permamently. The chance is 1:99, Be careful!");
    SendClientMessage(playerid, COLOR_LIGHTRED, "You have to wait emergency services in order to get up on your feet.");
	SendClientMessage(playerid, COLOR_LIGHTRED, "NOTE: if you died permamently your character will die, not your account.");

	return 1;
}



Re: class selection screen - knackworst - 20.11.2010

hmm, and can I see on player connect and the classselection?


Re: class selection screen - The_Moddler - 20.11.2010

Show us OnPlayerSpawn.


Re: class selection screen - armyoftwo - 20.11.2010

Код:
    SetSpawnInfo( playerid, 0, 0, 2809.5129,-2393.0266,13.6284, 89.0573, 0, 0, 0, 0, 0, 0 );
    SpawnPlayer(playerid);
OnPlayerConnect...
Maybe that's the cause, any ideas to fix it?


Re: class selection screen - Vince - 20.11.2010

Search for ForceClassSelection, that's the equivalent of pressing F4.


Re: class selection screen - armyoftwo - 20.11.2010

OnPlayerConnect
Код:
    ForceClassSelection(playerid);
    SetSpawnInfo( playerid, 0, 0, 2809.5129,-2393.0266,13.6284, 89.0573, 0, 0, 0, 0, 0, 0 );
    SpawnPlayer(playerid);
I hope this works..

EDIT: Still the same..