Raised This Month: $ Target: $400
 0% 

Client with that name...


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 07-09-2007 , 08:56   Re: Client with that name...
Reply With Quote #2

Here is the correct way!

Code:
static const g_reason[] = "blah blah....."
 
public plugin_init() {
     ....
     register_event("DeathMsg", "death_msg", "a")
}
 
public death_msg()
{
     new victim = read_data(2)
 
     switch(get_pcvar_num(killed))
     {
           case 1:
               server_cmd("amx_ban #%i %d ^"%s^"", get_user_userid(victim), get_pcvar_num(bantime), g_reason)
 
           case 2:
               server_cmd("kick #%i ^"%s^"", get_user_userid(victim), g_reason)
     }
}
Also i see you use "get_pcvar_num(reason)" ,that is incorrect! You must use "get_pcvar_string(pcvar)" to get a string!
__________________
Still...lovin' . Connor noob! Hello

Last edited by Alka; 07-09-2007 at 08:59.
Alka is offline
 



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 21:32.


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