Admin commands and other side-commands.
#5

Quote:
Originally Posted by DavidBilla
Посмотреть сообщение
But isn't health supposed to be a float value?
Like
pawn Код:
new Float:Health;
Both are acceptable, it's up to you.


Quote:

Secondly, how am I meant to make it where you type /givegun [playerid] [gunid] [ammo]?

Fetching the player text, slicing it into pieces with a space as the delimiter and then seperating each into the correct array.

instead of breaking your head on how to do so, you can use a command proccessor such as zcmd or ycmd.
and to slice(aka explode) the string into pieces, organizing each data which will pass into the specificied structure which you input in the command, use sscanf which can be found in the plugins board.

Quote:

Third thing lol, how do I make commands only acceptable by admins?

Find the array which is responsible for the admin level for each player and check if it's higher than the desired minimum. (or equal, if you want to make it for a specific level)

Quote:

Fourth, but final thing, how do I make a /setskin command? (only usable for admin level 2 +).

(answered above)
Reply


Messages In This Thread
Admin commands and other side-commands. - by mkmk - 17.10.2014, 23:04
Re: Admin commands and other side-commands. - by Eth - 18.10.2014, 06:36
Re: Admin commands and other side-commands. - by Neil. - 18.10.2014, 06:39
Re: Admin commands and other side-commands. - by DavidBilla - 18.10.2014, 06:41
Re: Admin commands and other side-commands. - by Kaperstone - 18.10.2014, 07:09
Re: Admin commands and other side-commands. - by mkmk - 18.10.2014, 10:31
Re: Admin commands and other side-commands. - by Eth - 18.10.2014, 10:39

Forum Jump:


Users browsing this thread: 1 Guest(s)