Raised This Month: $ Target: $400
 0% 

Slap max 2?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Nick
Senior Member
Join Date: Apr 2004
Location: Canada, Alberta, Cal
Old 07-05-2004 , 03:42   Slap max 2?
Reply With Quote #1

Well ok I finally got my slapall to work but it only slaps 2 people at a time.
Is it a problem with my script, or is it not possible to slap more than 2 people at once.
Code:
public slap_player(ids[]) {     new id = ids[0]         new slapdmg = (get_cvar_num("sv_slappower"))         new slapnum = (get_cvar_num("sv_numslaps"))     user_slap(id,slapdmg,slapnum)         return PLUGIN_CONTINUE } public admin_slapall(id,level,cid) {     if (!cmd_access(id,level,cid,1)){         return PLUGIN_HANDLED         }     new plist[32],pnum     get_players(plist, pnum ,"a")     for(new i=0; i<pnum; i++)     set_task(get_cvar_float("sv_slappower"),"slap_player", 0, plist, 1, "a", get_cvar_num("sv_numslaps"))     console_print(0,"All players have been slapped")     client_print(0,print_center,"All players have been slapped")     return PLUGIN_HANDLED } public amx_slappower(id,level,cid){     if (!cmd_access(id,level,cid,2))         return PLUGIN_HANDLED     new arg[8]     read_argv(1,arg,7)     if ((str_to_num(arg) > 100) || (str_to_num(arg) < 1)){         console_print(id,"[AMXX] MAX slap power is 20")                   return PLUGIN_HANDLED        }     set_cvar_string("sv_slappower",arg)     return PLUGIN_HANDLED          }     public amx_numslaps(id,level,cid){     if (!cmd_access(id,level,cid,2))         return PLUGIN_HANDLED     new arg[8]     read_argv(1,arg,7)     if ((str_to_num(arg) > 100) || (str_to_num(arg) < 2)){         console_print(id,"[AMXX] MAX slaps is 100")                   return PLUGIN_HANDLED        }     set_cvar_string("sv_numslaps",arg)     return PLUGIN_HANDLED          }
[/code]
__________________
Nick is offline
Send a message via MSN to Nick
 



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 14:45.


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