Can someone help me?
#1

Hello, I'm just wondering.

I want to make the /cchange, which you change your class.

When you type /cchange, it SendClientMessage(playerid, COLOR_YELLOW, "You will change your class upon the next death");


So, I want this command to show the dialog when you die, and you've requested to use it

The CMD
Код:
CMD:cchange(playerid, params[])
{
	ShowPlayerDialog(playerid, 4, DIALOG_STYLE_LIST, "Choose your class", "Assault\n Sniper\n Engineer\n JetTrooper\n Pilot\n", "Choose", "Cancel");
	return 1;
}
Reply
#2

You can add this new:bool:ClassChange[MAX_PLAYERS]
Quote:

CMD:cchange(playerid, params[])
{
ClassChange[playerid] = true;
SetPlayerHealth(playerid, 0);
return 1;
}

Add This in OnPlayerSpawn
Quote:

OnPlayerSpawn(playerid)
{
if(ClassChange[playerid] = true)
{
ShowPlayerDialog(playerid, 4, DIALOG_STYLE_LIST, "Choose your class", "Assault\n Sniper\n Engineer\n JetTrooper\n Pilot\n", "Choose", "Cancel");
}
}

Reply
#3

It's already under it
Reply
#4

Quote:
Originally Posted by PrinceOfPersia
Посмотреть сообщение
It's already under it
What do you mean exactly?
Reply
#5

It's under OnPlayerSpawn
Reply
#6

Just Test My Solution !!!!
Reply
#7

Define the dialog name with something like #define DIALOG_NAME 10040 in top of your script then apply the dialog under OnPlayerDeath.
pawn Код:
CMD:cchange(playerid, params[])
{
    ShowPlayerDialog(playerid, DIALOG_NAME, DIALOG_STYLE_LIST, "Choose your class", "Assault\n Sniper\n Engineer\n JetTrooper\n Pilot\n", "Choose", "Cancel");
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)