Raised This Month: $ Target: $400
 0% 

[SOLVED]Variable for every player [Help]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Callesson
Member
Join Date: Jan 2010
Old 12-02-2010 , 20:20   [SOLVED]Variable for every player [Help]
Reply With Quote #1

Hello guys

I am new to plugin scripting and I have started working on a test plugin.
My plugin is going to kick or ban you if you say a bad word to many times.
My problem is that the variable "warning" is not unique for each player.
So my question is, how can I make it unique for each player?
Code:
new warning = 0

public kick(id)
{
    if(warning == 0)
    {
        client_print(id, print_chat,"[Whatch your lang] Warning: 1/3")
        
        warning++
    }
    else if(warning == 1)
    {
        client_print(id, print_chat,"[Whatch your lang] Warning: 2/3")
        warning++
    }
    else if(warning == 2)
    {
        client_print(id, print_chat,"[Whatch your lang] Warning: 3/3 Next time you will get kicked")
        warning++
    }
    else if(warning == 3)
    {
        client_cmd(id,"echo Kicked from server! Next time please mind you language or end up with a ban!")
        client_cmd(id,"disconnect")
        warning++
    }
    else if(warning == 4)
    {
        client_print(id, print_chat,"[Whatch your lang] BANNED!")
        warning = 0
    }
}
__________________

Last edited by Callesson; 12-02-2010 at 21:34. Reason: Typo
Callesson 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 11:23.


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