20.06.2010, 22:26
Quote:
Originally Posted by » Lorenc « (back)
I did but im not sure, where should it be executed??
gotta go school ill be on after school! |
but heres a simple way to do this(it's noobish, but it's so you'll get a idea where to start):
Insert Quote
Make this variable:
Code:
new IsUsed;
When the Code is executed set IsUsed = 1;
and when the player is done executing the cmd set IsUsed = 0;
Code:
Код:
dcmd_order(playerid, params[]) { if (IsUsed == 0){ #pragma unused params ShowPlayerDialog(playerid, 0, DIALOG_STYLE_INPUT, "ORDER", "Type your objective for the Prisoners.\n Abusing will Suspend you.", "Submit", "Cancel");} else{ SendClientMessage(playerid,RED,"Somone is already using this cmd!"); } return 1; } dcmd_orderstop(playerid, params[]) { if (IsUsed == 1){ #pragma unused params SendClientMessage(playerid,RED,"You stopped it and others can now use the /order cmd"); IsUsed = 0; SendClientMessage(playerid,RED,"There are no orders!"); } return 1; }