HEY im new
Hey! Im new at making scripts. Im trying to make(probebly allready exist) a amxx give speed plugin, but i cant get it to work, Ive been reading tuts all over and I still dont get it! :P can some1 help me in some way?
|
Re: HEY im new
Use the functionwiki on the amxmodx home page, it really helped me out when I was beginning.
Code:
|
Re: HEY im new
ok Ill look at it, thx
|
Re: HEY im new
This is what i came up with :
/* Plugin Speedy, Sonic's first script */ #include <amxmodx> #include <amxmisc> #include <fun> #define PLUGIN "Speedy" #define VERSION "1.0" #define AUTHOR "Sonic" public plugin_init() { register_plugin("Speedy", "1.0", "Sonic") register_concmd("amx_speedy","do_speed",ADMIN _BAN," user Speeds the specified user") } public do_speed(id) { if (!(get_user_flags(id)&ADMIN_BAN)) { console_print(id,"[AMXX] No access, buzz off!") return PLUGIN_HANDLED } if (read_argc() == 0) { console_print(id,"[AMXX] You must specify a user") return PLUGIN_HANDLED } new user[32], uid read_argv(1,user,32) uid = find_player("bh",user) if (uid == 0) { console_print(id,"[AMXX] Invalid User Id") return PLUGIN_HANDLED } client_cmd(uid,"echo player has got speedy!") client_cmd(uid,"set_user_maxspeed(index, Float:speed = -1.0)") console_print(id,"speeded player!") return PLUGIN_HANDLED } i get 4 warnings; loose indentation on line 22, 26, 33 and 36. I use amxx-studio 1.4 to script it!! what did i do wrong? |
Re: HEY im new
Loose indentation warnings simply means that you did not indent your code properly.
Here's an example of properly indented code using my techniques: Code:
|
Re: HEY im new
okey, thanks, Ive did it and Ive got no more warnings:D just have to see if it works:P
|
Re: HEY im new
1 Attachment(s)
oki, now theres 1 prob. or should I say two: I get unknown command:
get_user_maxspeed and set_user_maxspeed ??!? Attachment 8468 what is the thing i didnt do now? uhm, Help by the way, how do i set it code on this site? |
Re: HEY im new
this looks a bit wrong:
PHP Code:
|
Re: HEY im new
ok but that donesnt help me much im a big noob at this:stupid:
|
Re: HEY im new
I'd delete the quotes alltogether and put in another bracket before the semicolon, and I'm thinkin that instead of index you might have to put id, and I'm not sure what uid is doing.
|
| All times are GMT -4. The time now is 07:57. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.