[help]how to make spawn after selecting the class?
#1

I have a problem, spawn the player first and then the class is selected, I want you first select the class and then if spawn. (problem in the /sc command)

if(ClassTaken[playerid] == 1)
{
ShowPlayerDialog(playerid, CLASS_DIALOG, DIALOG_STYLE_LIST,"Choose your class:","Soldier (0 scores - Rank 1)\nSniper (400 scores - Rank 3)\nPyroman (1,500 scores - Rank 5)\nSupporter (3,000 Scores - Rank 6)\nEngineer (5,000 scores - Rank 7)\nMedic (10,000 scores - Rank 9)\nPilot (15,000 scores - Rank11)\nSpy (20,000 Scores - Rank12)\nDonator (VIP Rank 3)","Choose","Back");
ClassTaken[playerid] = 0;

}

y este es el comando
CMD: sc(playerid, params[])
{
SendClientMessage(playerid, RED, "(PROCESSED): You will change your class after the next death!");
ClassTaken[playerid] = 1;
return 1;
}
Reply
#2

I don't understand what you're trying to do. I presume you're showing the dialog on OnPlayerDeath if the variable "ClassTaken" equals 1? If so, could you show the OnPlayerDeath function? (Just the part where you use the above variable.)
Reply
#3

Yo entendi que quieres decir, quieres un comando que te pone en la clas selection y despues te espawna...este es, usando zCMD include.... porfa dame +REP si te sirvio

CMD:class(playerid,params[]) {
new string[256];
format(string,sizeof(string),"INFO: You have forced yourself into class selection using /class"); SendClientMessage(playerid,orange,string);
ForceClassSelection(playerid);
return SetPlayerHealth(playerid,0.0);
}


el spawn es automatico al elegir el skin
Reply
#4

That isn't what he asked for.. He's obviously got his own class system that he wants to use instead of the default one. Also, please don't type in your own language, it's annoying.
Reply
#5

Quote:
Originally Posted by Luis-
Посмотреть сообщение
That isn't what he asked for.. He's obviously got his own class system that he wants to use instead of the default one. Also, please don't type in your own language, it's annoying.
this?
if(ClassTaken[playerid] == 0) return FirstSpawn[playerid] = 1;
foreach (Zones, i) if (CapturingZone[playerid] == i) LeavingCAPZONE(playerid, i);

I do not want to spawn

Reply
#6

Use TogglePlayerSpectating if that's what you want.
Reply
#7

Quote:
Originally Posted by Jamester
Посмотреть сообщение
Use TogglePlayerSpectating if that's what you want.
not working :/
Reply
#8

You sure you're doing it right? Something like this should work;
pawn Код:
CMD: sc(playerid, params[])
{
SendClientMessage(playerid, RED, "(PROCESSED): You will change your class after the next death!");
ClassTaken[playerid] = 1;
TogglePlayerSpectating(playerid, true);
return 1;
}
The once you've chosen a class, add this;
pawn Код:
TogglePlayerSpectating(playerid, false);
Reply
#9

Quote:
Originally Posted by Luis-
Посмотреть сообщение
You sure you're doing it right? Something like this should work;
pawn Код:
CMD: sc(playerid, params[])
{
SendClientMessage(playerid, RED, "(PROCESSED): You will change your class after the next death!");
ClassTaken[playerid] = 1;
TogglePlayerSpectating(playerid, true);
return 1;
}
The once you've chosen a class, add this;
pawn Код:
TogglePlayerSpectating(playerid, false);
I did everything right

Reply
#10

Hmm, try setting the player spectating when they die, and want to change their class, then the dialog should show.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)