Raised This Month: $ Target: $400
 0% 

Arument type mismatch


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kramesa
Veteran Member
Join Date: Feb 2011
Location: Brazil
Old 12-13-2011 , 18:02   Re: Arument type mismatch
Reply With Quote #1

Oks!

PHP Code:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN    "Dont Say Command = Kick"
#define AUTHOR    "kramesa"
#define VERSION    "1.0"

#define TIME 30

new Command
new Arg[64]

public 
plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("say""Say_Args")
    
Command register_cvar("amx_cmdkicktime""/example")
}

public 
client_putinserver(id)
{
    
Start_Time(id)
}

public 
Say_Args(id)
{
    
read_args(Arg63)
    
remove_quotes(Arg)
    
    if(
equal(ArgCommand4)
    {
        
remove_task(id
    }
}

public 
Start_Time(id)
{
    
set_task(float(TIME), "KickUser"id)
}

public 
KickUser(id)
{
    
server_cmd("kick #%d ^"%s^""get_user_userid(id), "Your dont say %s in %s seconds."CommandTIME

Already have error!
__________________
kramesa is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-13-2011 , 21:34   Re: Arument type mismatch
Reply With Quote #2

Quote:
Originally Posted by Emp` View Post
From the code you provided it looks like you have very little scripting knowledge.
Could have told you that weeks ago.

Quote:
Originally Posted by kramesa View Post
Oks!

PHP Code:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN    "Dont Say Command = Kick"
#define AUTHOR    "kramesa"
#define VERSION    "1.0"

#define TIME 30

new Command
new Arg[64]

public 
plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("say""Say_Args")
    
Command register_cvar("amx_cmdkicktime""/example")
}

public 
client_putinserver(id)
{
    
Start_Time(id)
}

public 
Say_Args(id)
{
    
read_args(Arg63)
    
remove_quotes(Arg)
    
    if(
equal(ArgCommand4)
    {
        
remove_task(id
    }
}

public 
Start_Time(id)
{
    
set_task(float(TIME), "KickUser"id)
}

public 
KickUser(id)
{
    
server_cmd("kick #%d ^"%s^""get_user_userid(id), "Your dont say %s in %s seconds."CommandTIME

Already have error!
The variable Command is an integer! That should be obvious. To be precise, the Command variable is a cvar pointer. Please learn the basics.
__________________
fysiks is offline
Reply



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:46.


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