Raised This Month: $ Target: $400
 0% 

Script Help Please


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Nick
Senior Member
Join Date: Apr 2004
Location: Canada, Alberta, Cal
Old 05-12-2004 , 01:09   Script Help Please
Reply With Quote #1

I've been working on this plugin for a while and I compiled it with no errors on the compiler that came with amxx, but when I tryed the online compiler I got 3 errors,

Code:
#include <amxmodx> #include <amxmisc>     public plugin_precache() { precache_sound("misc/tslap.wav") }   public admin_tslap(id,level,cid) { if (!cmd_access(id,level,cid,2)) return PLUGIN_HANDLED     new name[32], name2[32] new arg[32] get_user_name(id,name2,31) new player = cmd_target(id,arg,5) if (!player)         return PLUGIN_HANDLED         new ids[2] ids[0] = player get_user_name(player,name,32)   client_cmd(0,"spk misc/tslap")     set_hudmessage(225, 25, 25, -1.0, 0.32, 0, 2.0, 9.0, 0.8, 0.8, 2)     show_hudmessage(100,"%s Was Bitchslapped!!!") return PLUGIN_HANDLED } public tslap(ids[]){    set_task(0.2, "slap_player", 0, ids, 1, "a", 5)   return PLUGIN_CONTINUE } public slap_player(ids[]) { user_slap(ids[0],5) // Player is slapped with 5 Damage    return PLUGIN_CONTINUE }

If anyone could help me out that would be great Thank You.
__________________
Nick is offline
Send a message via MSN to Nick
BAILOPAN
Join Date: Jan 2004
Old 05-12-2004 , 01:10  
Reply With Quote #2

that would be because the online compiler doesn't work at all
__________________
egg
BAILOPAN is offline
Nick
Senior Member
Join Date: Apr 2004
Location: Canada, Alberta, Cal
Old 05-12-2004 , 01:31  
Reply With Quote #3

ooo never knew that thanks for the info any idea's why my script wont work? I tested it and nothing happens when I type amx_tslap <username> it just says couldnt find the player...
__________________
Nick is offline
Send a message via MSN to Nick
Ingram
Veteran Member
Join Date: May 2004
Old 05-12-2004 , 01:46  
Reply With Quote #4

where is the init?? don't u register the plugin and the command? Also u don't read in the information,

and what is the point of name2? i don't think u r going to use it. (name is probably gonna be used in the hudmessage )
Ingram is offline
Nick
Senior Member
Join Date: Apr 2004
Location: Canada, Alberta, Cal
Old 05-12-2004 , 01:47  
Reply With Quote #5

I have a init but I just didnt post it in the code.
So the name2 is not needed and I should take it out?
__________________
Nick is offline
Send a message via MSN to Nick
Ingram
Veteran Member
Join Date: May 2004
Old 05-12-2004 , 01:49  
Reply With Quote #6

ok well u might wanna look into read_argv or read_args in the includes, thats your problem then

u don't appear to be using it or wanting to use it, if your going to log the command then u will probably want it
Ingram is offline
Nick
Senior Member
Join Date: Apr 2004
Location: Canada, Alberta, Cal
Old 05-12-2004 , 01:51  
Reply With Quote #7

Ill give that a try
__________________
Nick is offline
Send a message via MSN to Nick
Nick
Senior Member
Join Date: Apr 2004
Location: Canada, Alberta, Cal
Old 05-12-2004 , 01:51  
Reply With Quote #8

n e thing else you can see that is wrong?
__________________
Nick is offline
Send a message via MSN to Nick
Nick
Senior Member
Join Date: Apr 2004
Location: Canada, Alberta, Cal
Old 05-12-2004 , 02:12  
Reply With Quote #9

JJkiller thanks alot it worked but I got a run time error on
Code:
show_hudmessage(100,"%s Was Bitchslapped!!!")
__________________
Nick is offline
Send a message via MSN to Nick
Nick
Senior Member
Join Date: Apr 2004
Location: Canada, Alberta, Cal
Old 05-12-2004 , 03:44  
Reply With Quote #10

nvm everything works now
__________________
Nick is offline
Send a message via MSN to Nick
Reply


Thread Tools
Display Modes

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 10:59.


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