Raised This Month: $ Target: $400
 0% 

Block team move while alive


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
xines
Veteran Member
Join Date: Aug 2013
Location: Denmark
Old 09-06-2018 , 13:21   Re: Block team move while alive
Reply With Quote #8

Quote:
Originally Posted by potatoz View Post
Both of these codes use a messy mix of old and new syntax and has uncompleted code (";") They do however have the basis down
ironically that your edit still had missing parts of transitional syntax , so here:

PHP Code:
#include <sourcemod>

#pragma newdecls required //Force (basics) of Transitional Syntax

public Plugin myinfo =
{
    
name "block team change",
    
author "potatoz",
    
description "blocks team changes whilst client is alive",
    
version "1.0",
    
url ""
};

public 
void OnPluginStart()
{
    
AddCommandListener(Command_JoinTeam"jointeam");
}

public 
Action Command_JoinTeam(int clientchar[] commandint args)
{
    if(
<= client <= MaxClients && IsClientInGame(client) && IsPlayerAlive(client))
    {
        
ReplyToCommand(client" \x07You may not switch team whilst alive");
        return 
Plugin_Handled;
    }
    
    return 
Plugin_Continue;

__________________
xines is offline
 


Thread Tools
Display Modes

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 13:23.


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