Raised This Month: $ Target: $400
 0% 

15 new errors...


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 01-06-2006 , 12:23  
Reply With Quote #3

Here's what's wrong with this script:

Code:
#define PLUGIN "APW/AUTO SLAPPER" #define VERSION "1.0" #define AUTHOR "nAcHo cHeEsE aka Venomxtinct" // alright, so you stated, these, but nothing is registering them. #define ADMINLEVELNEEDED // ok, you stated that this exists, but what's the definition? #include <amxmodx> #include <cstrike> #include <engine> new bool:g_awpslapper = false // you never change this or use it, so it's useless public init() { // it's plugin_init     register_cvar("amx_awpslap","1",FCVAR_SERVER|FCVAR_EXTDLL|FCVAR_UNLOGGED|FCVAR_SPONLY) // alright, but why all the extras? this won't work in mulitplayer because of the last } public user_weapon { // you pass no parameters (id) into this, and also nothing calls it     if user_has_weapon(id, weapon, CSW_AWP ) // you invented "user_has_weapon", and the func doesn't even work     { // bracket is out of place, end it before else     client_print("SOMEBODY HAS AN AWP, WATCH OUT!") // you don't specify who to print it to, or where to print it     else         client_print("Nobody has an awp, no worries this round!") // you don't specify who to print it to, or where to print it         }  // bracket out of place, open it after else, also, terrible indentation } public event_fire(id) { // nothing calls this     if client_fire(CSW_AWP,"awpslap") // wrap brackets around the condition, and also "client_fire" is not a function     {         user_slap; user_slap; // this is not like a config file, you can't randomly do that. Also, you don't specify who to slap, or for what damage     } } public cs_get_weapon_id { // you pass no parameter (id), and also you assume it'll be called (which it won't)     if cs_get_weapon_id(id, weapon, CSW_SG550 ) // wrap brackets around the condition, and also you don't pass correct parameters. Is cs_get_weapon_id even a func?     { // bracket out of place, you need to close it just before else         client_print("Somebody has an Auto, watch out!") // you don't tell client_print who to print it to, or where     else // not opened or closed         client_print("No worries about Auto this round") // you don't tell client_print who to print it to, or where         server_print("No worries about Auto this round") // you don't tell client_print who to print it to, or where     } // bracket out of place, open at else } public event_fire { // you pass no parameters (id), and also you already have a function with the same name as this, also nothing calls this     if client_fire(CSW_SG550,"autoslap") // what? You're saying if they have an 550 to slap them? Also, wrap brackets around the condition     {         server_slap_client; wait; server_slap_client; wait // this is just too funny for words     } } public not_drop { // you pass no parameters (id), also nothing calls it     if client_fire(CSW_AWP,"awpslap_damage") // there is no symbol "client_fire", and also wrap brackets around this     {         server_slap_client 20; wait; serverslap client 79 // again, too funny for words     } } public not_drop { // you don't pass any parameters, and also theres already a symbol with this name, also nothing calls it     if client_fire(CSW_SG550 or CSW_G3SG1,"autoslap_damage") // what? I think you're trying to do like event_fire     {         server_slap_client 20; wait; serverslap client 79 // again, you do the same thing. This is not a config file, it's a script.     } } public get_user_health { // already a function built into AMXX, also you pass no parameters(id), also nothing calls it     if (is_user_alive  == 1 and cs_get_weapon_id == CSW_AWP) // you pass no parameters into is_user_alive(id), the correct symbol for "and" is &&, and cs_get_weapon_id returns nothing     { // terrible indentation inside these brackets     client_cmd ("kill") // who?     client_print("You shouldn't have used an awp.") // don't specify who to print to or where     client_print("You have been punished") // ^^^^^^^^^^^^^^^^^^^^^^     client_print("Drop the AWP next time :)") // ^^^^^^^^^^^^^^^^^^^^^     server_print("Hopefully you have learned a lesson") // ^^^^^^^^^^^^^     } } public say_after { // nothing calls this, also you pass no parameters into it, (id)     if (is_user_alive  == 1 and cs_get_weapon_id == CSW_SG550) // &&, not and, also you pass no id into is_user_alive, and cs_get_weapon_id returns nothing     { // just refer to get_user_health (the func above this)     client_cmd ("kill")     client_print("You shouldn't have used a SG550.")     client_print("You have been punished")     client_print("Drop the SG550 next time :)")     server_print("Hopefully he has learned a lesson")     } } public say_after { // already exists, nothing calls this, and you pass no parameters into it (id)     if (is_user_alive  == 1 and cs_get_weapon_id == CSW_G3SG1) // refer to 2 functions above this     {     client_cmd ("kill")     client_print("You shouldn't have used an G3SG1.")     client_print("You have been punished")     client_print("Drop the G3SG1 next time :)")     server_print("Hopefully you have learned a lesson")     } } public Roundstart(id) { // hooray! You actually passed an id into this, too bad it's a global event. Also, nothing calls it.     if (cs_roundstart == 1) // where did you get cs_roundstart from?     { // bad indentation     server_print("No AWPs or Autos!!!") // alright... won't help the server op much     console_print("No AWPs or Autos!!!") // to who?     client_print("No AWPS or AUTOS!!!") // to who and where?     } }
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:46.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode