#10

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
Reply


Messages In This Thread
help - by omer5198 - 12.04.2011, 11:09
Re: help - by wheelman_WM - 12.04.2011, 11:10
Re: help - by omer5198 - 12.04.2011, 11:12
Re: help - by Alby Fire - 12.04.2011, 11:15
Re: help - by wheelman_WM - 12.04.2011, 11:22
Re: help - by omer5198 - 12.04.2011, 11:52
Re : help - by Vukilore - 12.04.2011, 12:22
Re: Re : help - by omer5198 - 12.04.2011, 18:21
Re: help - by antonio112 - 12.04.2011, 18:32
Re: help - by omer5198 - 12.04.2011, 19:19

Forum Jump:


Users browsing this thread: 1 Guest(s)