AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Need code (https://forums.alliedmods.net/showthread.php?t=160094)

Artifact 06-25-2011 02:32

Need code
 
I need cvars. When cvar = ban plugin ban player for something but when cvar is kick plugin kick player.....

PHP Code:

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)

    new 
Commands [][] = { "say fuck you""say blowing" }

    for(new 
ii<sizeof(Commands); i++)
    {
        
register_clcmd(Commands[i], "fuckurmama"ADMIN_KICK"!!!")
    }
}

public 
fuckurmama(id)
{
        new 
Fucker[3]
        
get_user_name(idFuckercharsmax(Fucker))
        
server_cmd("kick #%d ^"Try to fuck someone else.^""Fucker)



Exolent[jNr] 06-25-2011 11:24

Re: Need code
 
Code:
new pCvarBan; public plugin_init() {     pCvarBan = register_cvar("fuckyou_ban", "1"); } function(id) {     if(get_pcvar_num(pCvarBan))     {         // ban     }     else     {         // kick     } }


All times are GMT -4. The time now is 23:24.

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