How to check if player is spawned
#1

i was making a reclass command
which will set player hp to 0
then check if player spawned
it will show dialog
Idk how to check if player is spawned
Reply
#2

I didn't fully understand you,but if you need a command that forces the player to team selection (class selection) here it is
Код:
CMD:changeteam(playerid,params[])
{
    ForceClassSelection(playerid);
    TogglePlayerSpectating(playerid, true);
    TogglePlayerSpectating(playerid, false);
 	return 1;
}
You must include zcmd for this to work.
Reply
#3

i got zcmd
i mean i did that on player Spawn it shows Class selection Dialog
how can i make reclass Cmd do that after Death it will show him class selection Dialog and i made class selection dialog on Player Spawn

Another problem

my class selection dialog shows after every death when player spawns.I want the class selection dialog to only show once when player spawns and it should only show again if player uses /reclass
Reply
#4

pawn Код:
public OnPlayerSpawn(playerid)
{
ShowPlayerDialog(playerid, DIALOG_CLASSELECT, DIALOG_STYLE_LIST, "Class Selection", "{00C0FF}Soldier\n{00C0FF}Sniper\n{00C0FF}Medic\n{00C0FF}JetTrooper\n{00C0FF}Pilot\n{00C0FF}Spy\n{00C0FF}Ranger\n{00C0FF}Elite Ranger", "Select", "");
return 1;
}
this dialog shows every time when player dies and spawns again.I only want it to show one time when player connects and spawns.
Thatss why i made Reclass cmd to change class
Reply
#5

If you will keep seting the player HP to 0 he will keep dying.
If you want to keep him in the spectator camera then you will need to TogglePlayerSpectating.
Reply
#6

i just want to get rid of class selection dialog.I only want it to appear when player connects and spawns first time.Next time if player dies the dialog should not show.
How do i do this
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)