First Plug. Need Help. Be Gentle.
So then, I recently switched over my cs server from AMX mod to AMXX. However, some of the old plugs I used to have weren't available for amxx, and since I like a challenge, I decided to write some of them myself rather than converting them (which I don't know how to do anyway 8) ).
The first plugin I was trying to make was an amx_money command for admins of level h. Example: amx_money Player 16000 ;Entered into the console. So I read a bunch of stickes (this is my first small coding, but by no means my first time coding) and a few tutorials and came up with this: Code:
(In the preview my indentations aren't correct, but they are in the .sma file. I'm not that sloppy :wink: ) However, when I compiled it (no errors, just a warning about not returning a value), the server doesn't recognize amx_money as a command. And yes, before you ask, I did put it into my plugins.ini. Thoughts? Help? Suggestions? P.S. Rather than simply setting their money, it would be cool if I could set it to add on, but I don't know the funtion for returning a player's funds. |
Try using this:
Code:
Oops and also, amount needs to be indexed. Use amount[5]. |
I feel a little stupid. Use that line in place of what? :oops:
|
I feel a little stupid. Use that line in place of what? :oops:
[Edit] For some reason this posted twice....[/edit] |
Here
1 Attachment(s)
Take a look at my code.
|
Ah, I see now. Many thanks.
|
NP
No problem, if you need any more help with anything, just post it :)
|
Heh. It's still not registering the command, but I don't think it's a code issue. All you need to do is put the amxx file in plugins, and add it to plugins.ini, right?
|
lol yes do that, but I just realized, change this line:
Code:
to this: Code:
the ! says if the don't have access let them use the command... lol sorry |
You da man, it recognizes the command :D
I hope by now I'm not being a bother, but somethin's still wrong. It can never find the player. Since I don't 100% understand the code you gave me, I can't tell whether I need to input a name or ID number. But I tried it both ways with and without quotes. Still no ID found. I'm assuming that this: Code:
*Needs to Brush Up on his Small* |
| All times are GMT -4. The time now is 19:21. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.