Raised This Month: $ Target: $400
 0% 

block sv_restart or sv_restartround


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
L//
Senior Member
Join Date: Aug 2008
Location: Not found
Old 11-16-2008 , 18:21   block sv_restart or sv_restartround
Reply With Quote #1

Is there a way to block sv_restartround or sv_restart?
L// is offline
Send a message via MSN to L//
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 11-17-2008 , 06:03   Re: block sv_restart or sv_restartround
Reply With Quote #2

PHP Code:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Block rr"
#define VERSION "1.0"
#define AUTHOR "Alucard"

new restart;
new 
restartround;

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR);
    
restart register_cvar("sv_restart","1");
    
restartround register_cvar("sv_restartround","1");
    if(
get_pcvar_num(restart && restartround))
    return 
PLUGIN_HANDLED;

i know that plugin_init need to return a value but.. emm i dont know how to call an event, or something like this, cuz i am using a cvar.. not clcmd or concmd emm...

the plugin compile.. but with a warning.. i dk if plugin work..
Alucard^ is offline
Send a message via Skype™ to Alucard^
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-17-2008 , 06:21   Re: block sv_restart or sv_restartround
Reply With Quote #3

Your plugin does nothing Alucard^.

I've tried many ways without success for the moment.
__________________
Arkshine is offline
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 11-17-2008 , 06:22   Re: block sv_restart or sv_restartround
Reply With Quote #4

yeah i think that.. i am new i know...
Alucard^ is offline
Send a message via Skype™ to Alucard^
AntiBots
Veteran Member
Join Date: May 2008
Location: Brazil
Old 11-17-2008 , 15:22   Re: block sv_restart or sv_restartround
Reply With Quote #5

-->
Attached Files
File Type: sma Get Plugin or Get Source (leo_123.sma - 739 views - 719 Bytes)
__________________
AntiBots is offline
Send a message via ICQ to AntiBots Send a message via MSN to AntiBots Send a message via Skype™ to AntiBots
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-17-2008 , 15:43   Re: block sv_restart or sv_restartround
Reply With Quote #6

Nice attempt, but it doesn't work. Also, sv_restart can be used without amx_cvar.
__________________
Arkshine is offline
Old 11-17-2008, 15:55
ConnorMcLeod
This message has been deleted by ConnorMcLeod. Reason: code updated on next post
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-17-2008 , 16:03   Re: block sv_restart or sv_restartround
Reply With Quote #7

Yeah, it works but using such forward just for that... -_-"
__________________
Arkshine is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-17-2008 , 16:29   Re: block sv_restart or sv_restartround
Reply With Quote #8

Osef.

Tested and seems to works, admins with flag ADMIN_RCON can still make a restart with command amx_restart.
Attached Files
File Type: sma Get Plugin or Get Source (no_restart.sma - 1133 views - 1.2 KB)
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
L//
Senior Member
Join Date: Aug 2008
Location: Not found
Old 11-17-2008 , 17:20   Re: block sv_restart or sv_restartround
Reply With Quote #9

thank you very much connor. +k
L// is offline
Send a message via MSN to L//
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 21:09.


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