100% newb here
I'm trying to learn this coding stuff, and I decided to make a simple plugin: When a player says /give_awp , he gets an awp. Later on, I'm going to make all the weapons available to be given, but I just want this simple plugin at first, so I can understand the coding that must be done to give weapons on a specified command.
All I know right now is that I have to: Code:
#include <amxmodx> |
Re: 100% newb here
Code:
Hope this helps. |
Re: 100% newb here
Please, do not post trivial problems such as this when their solutions can easily be found by looking at tutorials or other plugins. I know for a fact you could have gotten the register_clcmd() part down.
Also: Code:
|
Re: 100% newb here
@Deviance, thankyou so much!
@Zenith, will not happen again ;) Where can I find a list ALL the weapon codes like give_item(id, "weapon_awp") |
Re: 100% newb here
Code:
weapon_mp5navy |
Re: 100% newb here
your da bomb
+karma for your advice (zenith) and your help (dev) :) ps: im guessing if I wanted 2 commands, the code would read like: Code:
#include <amxmodx> |
Re: 100% newb here
is that correct?
PS: what if a player had an m4a1 already, but he typed /give_m4a1, would that give him another one and bug out, or would it just not give him another one? I don't want any bugs :( |
Re: 100% newb here
For your say problem:
Code:
I kind of made the code generic, could be optimized (implement better methods) a lot more. Anywho, this will allow you to do "/give m4a1", "/give ak47", etc instead of re-creating basically the same command over and over again. |
Re: 100% newb here
@st0rmstan: Well, thats something about any kind of scripting and coding. You try something, and keep trying until you get what you want. If there are bugs, you need to work out the bugs.
|
Re: 100% newb here
hm, what about this code? It's a little big :\
(I don't really understand what your's (zenith) does??) Code:
#include <amxmodx>PS: |
| All times are GMT -4. The time now is 10:32. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.