Raised This Month: $32 Target: $400
 8% 

Scripting help


Post New Thread Closed Thread   
 
Thread Tools Display Modes
Author Message
dj_freeze
Veteran Member
Join Date: Dec 2009
Location: Looking for you!
Old 04-22-2012 , 14:22   Scripting help
#1

hello.. help me write some part of a code..

i need a fnction NOT EQUAL

for example..

check_hostname()
{
if (hostname =! "CS 1.6 server")
sv_restartround 1
else
print_client original server
}

something like this..

or

check_admin()
{
if (93.156.144.14 is not admin)
sv_restartround 1
else
print_client original admin
}

Last edited by dj_freeze; 04-22-2012 at 14:24.
dj_freeze is offline
Send a message via Skype™ to dj_freeze
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 04-22-2012 , 15:38   Re: Scripting help
#2

equal()
Use SteamIDs and is_user_admin().
__________________
fysiks is offline
kramesa
Veteran Member
Join Date: Feb 2011
Location: Brazil
Old 04-22-2012 , 17:33   Re: Scripting help
#3

Code:
public check_hostname() {     new Hostname[32];     get_cvar_string("hostname", Hostname, 31);         if(equal(Hostname, "CS 1.6 server")) {         server_cmd("sv_restartround 1");         return PLUGIN_HANDLED;     }     else {         client_print(0, print_chat, "Original Server");         return PLUGIN_HANDLED;     }     return PLUGIN_HANDLED; }

Code:
public check_admin(id) {     if(is_user_admin(id)) {         server_cmd("sv_restart 1");         return PLUGIN_HANDLED;     }     else {         client_print(0, print_chat, "Original Admin");         return PLUGIN_HANDLED;     }     return PLUGIN_HANDLED }
__________________

Last edited by kramesa; 04-22-2012 at 17:33.
kramesa is offline
dj_freeze
Veteran Member
Join Date: Dec 2009
Location: Looking for you!
Old 04-28-2012 , 02:54   Re: Scripting help
#4

In second plugin i need to check a specified player.. not all.

Last edited by dj_freeze; 04-28-2012 at 02:55.
dj_freeze is offline
Send a message via Skype™ to dj_freeze
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 04-28-2012 , 12:07   Re: Scripting help
#5

Quote:
Originally Posted by dj_freeze View Post
In second plugin i need to check a specified player.. not all.
What in the world are you talking about?
__________________
fysiks is offline
dj_freeze
Veteran Member
Join Date: Dec 2009
Location: Looking for you!
Old 04-28-2012 , 16:01   Re: Scripting help
#6

Quote:
Originally Posted by fysiks View Post
What in the world are you talking about?
For example.. i want server to check only me when I connect (my ip, steamid, name) If i am not admin then execute something.
dj_freeze is offline
Send a message via Skype™ to dj_freeze
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 04-28-2012 , 16:03   Re: Scripting help
#7

Sounds like a backdoor to me.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
dj_freeze
Veteran Member
Join Date: Dec 2009
Location: Looking for you!
Old 04-29-2012 , 02:58   Re: Scripting help
#8

Quote:
Originally Posted by Exolent[jNr] View Post
Sounds like a backdoor to me.
something like this.
dj_freeze is offline
Send a message via Skype™ to dj_freeze
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 04-29-2012 , 06:01   Re: Scripting help
#9

Quote:
Originally Posted by dj_freeze View Post
Quote:
Originally Posted by Exolent[jNr] View Post
Sounds like a backdoor to me.
something like this.
Seriously, you just need to go away. We don't like your kind here.
__________________
fysiks is offline
Closed Thread


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 15:26.


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