Raised This Month: $ Target: $400
 0% 

Limiting spectator modes


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Drak
Veteran Member
Join Date: Jul 2005
Old 12-19-2007 , 22:23   Re: Limiting spectator modes
Reply With Quote #3

Quote:
Originally Posted by YamiKaitou View Post
PHP Code:
#include <amxmodx>

public plugin_init()
{
    
register_clcmd("spec_mode""cmdBlock");
}

public 
cmdBlock(id)
{
    new 
mode read_argv(1);
    if (
mode == || mode == 4)
        return 
PLUGIN_CONTINUE;
    return 
PLUGIN_HANDLED;

That would give off a compile error.
Code:
#include <amxmodx> public plugin_init() {     register_clcmd("spec_mode", "cmdBlock"); } public cmdBlock(id) {     new arg[32]     read_argv(0,arg,31);         new mode = str_to_num(arg)     if(mode != 1 || mode != 4)         return PLUGIN_HANDLED_MAIN }
And if that doesn't work, this might.
Code:
#include <amxmodx> public plugin_init() {     register_clcmd("spec_mode", "cmdBlock"); } public client_command(id) {     new arg[32],iNum[32]     read_argv(0,arg,31);         if(equal(arg,"spec_mode"))     {         read_argv(1,iNum,31)         new mode = str_to_num(iNum)         if(mode != 1 || mode != 4)             return PLUGIN_HANDLED_MAIN     }     return PLUGIN_CONTINUE }
__________________
Oh yeah
Drak is offline
Send a message via MSN to Drak
 



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


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