Raised This Month: $ Target: $400
 0% 

Whats wrong with my snippet!


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
TotalNoobScripter
Senior Member
Join Date: Aug 2004
Old 09-27-2004 , 21:27   Whats wrong with my snippet!
Reply With Quote #1

hello, heres a section of code i need help with.

in the plugin init i have
Code:
//  Admin Commands       register_concmd("amx_cmo","createmoney",ADMIN_LEVEL_E)       register_concmd("amx_dmo","destroymoney",ADMIN_LEVEL_E)       register_concmd("amx_ssa","setsalaries",ADMIN_LEVEL_E)     register_concmd("amx_sjo","setjobs",ADMIN_LEVEL_E)

then what i want to run is the amx_sjo (setjobs) funtcion.

Code:
public setjobs(id){ new authid[32],query[256];     get_user_authid(id,authid,31);     new argtarget[32];     read_argv(1,argtarget,31);     new target = cmd_target(id,argtarget,8);     if(!target) return PLUGIN_HANDLED;     new authid2[32];     get_user_authid(target,authid2,31);     format(query,255,"UPDATE money SET job=%s WHERE steamid='%s'",newjob,authid);     mysql_query(mysql,query);     format(query,255,"SELECT job FROM money WHERE steamid='%s'",authid);     mysql_query(mysql,query);     if(mysql_nextrow(mysql) > 0) {         mysql_getfield(mysql,1,currentjob,31);         client_print(id,print_notify,"You Job has been changed to %s",currentjob);             set_hudmessage(0,175,0,-1.0,-1.0,0,0.0,5.0,0.0,0.0,2);             show_hudmessage(id,"Your new job is %s",currentjob);             return PLUGIN_HANDLED;     } else {             client_print(id,print_notify,"There was an error somewhere.");             return PLUGIN_HANDLED;

the only problem is i dont know how to have arguments in the command that would be asigned to newjob and make a varable to return a current job. the authid thing i got from another script. plz plz plz help me. onceagain read my sig, don't yell at me, im a n00b.
TotalNoobScripter is offline
Send a message via AIM to TotalNoobScripter
 



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 17:11.


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