AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Need help about chat commands (https://forums.alliedmods.net/showthread.php?t=84329)

AoD90 01-24-2009 13:23

Need help about chat commands
 
How to make say command
Code:

/live <cttag> <ttag> <esl/kode5> <rec> (rec - record if defined)
I made this:

Code:

public cmdSay(id)
{
    if (!access(id, ADMIN_LEVEL_A))
    {
        return PLUGIN_CONTINUE
    }
    new text[200]
    read_args(text,199)
    remove_quotes(text)

    if(containi(text,"/live ")==0)
    {
        startLive(0)
        format(text,199,"%s",text[6])

        strbreak(text,glavniCT,31,text,199)

        new i = strlen(text)
        while(i>=0)
        {
        if(text[i]==' ')
        {
            break
        }
        i--
        }

        strbreak(text,glavniT,31,text,199)
       
        return PLUGIN_HANDLED
    }
    return PLUGIN_CONTINUE
}


Dr.G 01-26-2009 16:59

Re: Need help about chat commands
 
nm

AoD90 01-31-2009 10:24

Re: Need help about chat commands
 
Anyone???

Starsailor 01-31-2009 13:29

Re: Need help about chat commands
 
PHP Code:


public plugin_init() {
    
    
register_clcmd("say /live","cmdLive")
}


public 
cmdLive (id){
    
    
//your code here



AntiBots 01-31-2009 13:32

Re: Need help about chat commands
 
Look how I do here: http://forums.alliedmods.net/showthread.php?t=81156

AoD90 01-31-2009 14:35

Re: Need help about chat commands
 
Didn't help very much

AoD90 02-01-2009 10:35

Re: Need help about chat commands
 
I found it :D

Code:

    strtok(text, komanda, 11, text, 199, ' ')
    strtok(text, glavniCT, 31, text, 199, ' ')
    strtok(text, glavniT, 31, text, 199, ' ')
    strtok(text, config, 10, text, 199, ' ')
    strtok(text, demo, 5, text, 199, ' ')



All times are GMT -4. The time now is 01:50.

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