Automatic Command?
#1

How could i do an Automatic command? Like the System types the Command not you?

I want it to automatically type /chooseclass
Reply
#2

Use timer.
Reply
#3

turn the command into a function
Reply
#4

Quote:
Originally Posted by dowster
Посмотреть сообщение
turn the command into a function
How so?
Reply
#5

Код:
forward Function(any params here);

public Function(same params)
{
     stuff to do;
}
fairly easy
Reply
#6

forward Function(ChooseClass);

public Function(ChooseClass)
{
SendClientMessage(playerid,COLOR, " BlahBlahBlah");
return 1;
}

Like That?
Reply
#7

no like everything the command does, needs to be in the function. what exactly does this command do? put the player in the class selection menu? please post the code. thank you.
Reply
#8

Код:
if(strcmp("/ChooseClass", cmdtext, true, 10) == 0)
	{
	    ShowPlayerDialog(playerid,699,DIALOG_STYLE_LIST,"Choose Class","Sniper Class\nAssualt Class\nRocket Class ($150)\nPilot Class ($200)\n","Accept", "Exit");
		return 1;
	}
And of course i have my Whole Dialog crap
Reply
#9

You could do

pawn Код:
OnPlayerCommandText(playerid, "/chooseclass");
Reply
#10

Код:
//top of script
forward chooseclass{};

//somewhere, could be bottom, idc
public chooseclass{}
{
      for(new i = 0; i <= MAX_PLAYERS; i++)
      {
            ShowPlayerDialog(i,699,DIALOG_STYLE_LIST,"Choose Class","Sniper Class\nAssualt Class\nRocket Class ($150)\nPilot Class ($200)\n","Accept", "Exit");
      }
      return 1;
}
how would you like it to be started? another command, timer?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)