ForceClasSelection
#1

How can I force the class selection...?

I have random spawns within my script and when I type this command in, you can choose your class but it doesn't return to the class selection screen. This is what happens - i type /kill and die, depending on what team I'm on, it will place my character and one of the random spawns across Los Santos and let me choose my character. If I'm Criminal, I want to type /kill and change to a Cop, I will spawn at one of the Criminal Random Spawns...?

Here is the /kill command, request for more of my script if you want it. This is done directly from a tutorial so I claim no credit. I'm just trying to implement this command with the script!

pawn Код:
CMD:kill(playerid, cmdtext)
{
    SetPlayerHealth(playerid, 0);
    ForceClassSelection(playerid);
    return 1;
}
Reply
#2

You have it backwards. You want to ForceClassSelection, and then kill the player.
Reply
#3

Okay, thanks
Reply
#4

Try this

pawn Код:
CMD:kill(playerid, cmdtext)
{
    SetPlayerHealth(playerid, 0);
    ForceClassSelection(playerid);  
    TogglePlayerSpectating(playerid, true);
    TogglePlayerSpectating(playerid, false);  
     return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)