Raised This Month: $ Target: $400
 0% 

Warden Open


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Kubad
Senior Member
Join Date: Sep 2015
Location: Czech Republic
Old 11-17-2015 , 18:47   Warden Open
Reply With Quote #1

Hello guys i have problem with this code dont working and dont say anything help me

PHP Code:
#include <sourcemod>
#include <warden>
#include <smartjaildoors>

#define SMWARDEN "\x01[\x04Warden\x01]"
#define SMCELY "\x01[\x04Cely\x01]"


public OnPluginStart()  

    
RegConsoleCmd("sm_open"opencells);
    
RegConsoleCmd("sm_close"opencells);
}     

public 
Action:opencells(clientargs

    if (
warden_iswarden(client))  
    {
        
PrintToChat(client"%s Warden Otevrel Cely!"SMCELY);
        
SJD_OpenDoors(); 
    }else{
        
PrintToChat(client"%s Nemas Wardena"SMWARDEN);
    }


public 
Action:closecells(clientargs

    if (
warden_iswarden(client))  
    {
        
PrintToChat(client"%s Warden zavrel Cely!"SMCELY);
        
SJD_CloseDoors();
    }else{
        
PrintToChat(client"%s Nemas Wardena"SMWARDEN);
    }

Kubad is offline
Franc1sco
Veteran Member
Join Date: Oct 2010
Location: Spain (Madrid)
Old 11-17-2015 , 18:49   Re: Warden Open
Reply With Quote #2

The code seems good. You need to configure this plugin correctly
__________________
Veteran Coder -> Activity channel
Coding on CS2 and taking paid and free jobs.

Contact: Steam, Telegram or discord ( franug ).

You like my work? +Rep in my steam profile comments or donate.

Franc1sco is offline
Send a message via MSN to Franc1sco
Kubad
Senior Member
Join Date: Sep 2015
Location: Czech Republic
Old 11-17-2015 , 20:31   Re: Warden Open
Reply With Quote #3

thank you its working
Kubad is offline
Kailo
Senior Member
Join Date: Sep 2014
Location: Moscow, Russia
Old 11-18-2015 , 04:16   Re: Warden Open
Reply With Quote #4

One optimization for code, when use defined perfix, you can use addition of strings.
PHP Code:
#define PREFIX "[Warden] "

// Somewhere in code
PrintToChat(clientPREFIX ... "You goddamn right!"); 
After compilation you get
PHP Code:
PrintToChat(client"[Warden] You goddamn right!"); 
For your code:
PHP Code:
#include <sourcemod> 
#include <warden> 
#include <smartjaildoors> 

#define SMWARDEN "\x01[\x04Warden\x01]" 
#define SMCELY "\x01[\x04Cely\x01]" 


public OnPluginStart()   
{  
    
RegConsoleCmd("sm_open"opencells); 
    
RegConsoleCmd("sm_close"opencells); 
}      

public 
Action:opencells(clientargs)  
{  
    if (
warden_iswarden(client))   
    { 
        
PrintToChat(clientSMCELY ... " Warden Otevrel Cely!"); 
        
SJD_OpenDoors();  
    }else{ 
        
PrintToChat(clientSMWARDEN ... " Nemas Wardena"); 
    } 
}  

public 
Action:closecells(clientargs)  
{  
    if (
warden_iswarden(client))   
    { 
        
PrintToChat(clientSMCELY ... " Warden zavrel Cely!"); 
        
SJD_CloseDoors(); 
    }else{ 
        
PrintToChat(clientSMWARDEN ... " Nemas Wardena"); 
    } 

Kailo is offline
tommie113
AlliedModders Donor
Join Date: Oct 2013
Old 11-18-2015 , 09:04   Re: Warden Open
Reply With Quote #5

RegConsoleCmd("sm_close", opencells);

public Action:closecells(client, args)
{

That is the problem for the closing part.
You are calling opencells on sm_close
__________________
No longer taking requests due to lack of time and interrest.
Only helping out with minor things through forum.
tommie113 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 23:22.


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