Quote:
Originally Posted by antonio112
Well, if I`m not wrong, I think I know what you want. Well, for that, you need to make a global variable, like:
pawn Код:
new minigun[MAX_PLAYERS];
And now, in the commands do like:
pawn Код:
CMD:giveweapon(playerid, params[]) { //bla bla bla minigun[playerid] = 1;
And for the other command like:
pawn Код:
CMD:minigun(playerid, params[]) { if(minigun[playerid] == 0) return SendClientMessage(playerid, -1, "Use /giveweapon first.");
//the rest of the code here, what do you want it to do. minigun[playerid] = 0; }
Basically, what this will do: /giveweapon will set the 'minigun' variable to 1 for the player who uses the command. To use the /minigun command, you`ll need to have the 'minigun' variable to 1. Else, it`ll do nothing. Is that what you wanted? Oh and don`t forget, to set the variable to 0 when he uses the command ... that`s only if you want.
|
that's not what i meant... i will tell you what i wanted to do...
if i will write /teleportsave NAME it will create a command (/NAME) and the command will teleport the player to the place he wrote the /teleportsave... so it basiclly how to create a command while in game