Raised This Month: $ Target: $400
 0% 

Hello newbie starting is so hard...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Metanabol
Member
Join Date: Feb 2009
Old 02-14-2009 , 19:10   Hello newbie starting is so hard...
Reply With Quote #1

Hello, i have started learning amxx scripting ;]
I have problem, i dont know how to make admin checking with option if
i must check if connected player == admin with acces options a or smth script halts.
Code:
client_cmd(id, "bind ^"f9^" ^"say Im g**, because im using cheats.^"")
and then with else option it will write simple text in server that Admin: %name connected. Cheaters blowing time.
Code:
#include <amxmodx>

public plugin_init()
{
   register_plugin("key bind", "1.0", "Metanabol")
}

public client_connect(id)
{
   client_cmd(id, "bind ^"f9^" ^"say Im g**, because im using cheats. [f9]^"")
   return PLUGIN_CONTINUE
}
Next question is - how can i add timer to line
Code:
client_cmd(id, "bind ^"f9^" ^"say Im g**, because im using cheats.^"")
to insert this line to players every x seconds ?


Yes. Im newbie. I dont know basic commands. But i want to lear more than ripping f***ing scripts... i want to edit it for me basicly for better server use.
Metanabol is offline
padilha007
Senior Member
Join Date: Jul 2008
Old 02-14-2009 , 20:15   Re: Hello newbie starting is so hard...
Reply With Quote #2

set_task( float time(seconds) ,"function", id)

Ex:

PHP Code:
public client_connect(id)
{
     
set_task(10.0,"bind"id)
}

public 
bind(id) {
          
client_cmd(id"bind ^"f9^" ^"say Im g**, because im using cheats.^"")

PHP Code:
if((get_user_flags(id)&ADMIN_SLAY)) 
If player have SLAY flag (ADM)

PHP Code:
if(!(get_user_flags(id)&ADMIN_SLAY)) 
if player dont have SLAY flag (not ADM)
__________________


Last edited by padilha007; 02-14-2009 at 20:21.
padilha007 is offline
Metanabol
Member
Join Date: Feb 2009
Old 02-14-2009 , 21:21   Re: Hello newbie starting is so hard...
Reply With Quote #3


#include <amxmodx>

public plugin_init()
{
register_plugin("Bind", "1.0", "Metanabol")
}

public client_connect(id)
{
if(!(get_user_flags(id)&ADMIN_SLAY)) {
set_task(10.0,"bind", id)
}

}
public bind(id)
{
client_cmd(id, "bind ^"f9^" ^"say ou mai gad im hax0r [f9]; +right; say hell yea im spinning round around...;+forward^"")

}

sooo i connect to server, i have admin on my ip with full access. i press f9 everythings work OK, but then i (bind f9 "") after period of time it wont bind my key again... and if(!(get_user_flags(id)&ADMIN_SLAY)) not workink ;/
Metanabol is offline
padilha007
Senior Member
Join Date: Jul 2008
Old 02-14-2009 , 23:58   Re: Hello newbie starting is so hard...
Reply With Quote #4

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

public plugin_init()
{
    
register_plugin("Bind""1.0""Metanabol")
}

public 
client_connect(id)
{
    if(!(
get_user_flags(id)&ADMIN_SLAY))
    {
        
set_task(10.0,"bind"id)
    }
}
public 
bind(id)
{
    
client_cmd(id"bind ^"f9^" ^"say ou mai gad im hax0r [f9]; +rightsay hell yea im spinning round around...;+forward^"")

__________________

padilha007 is offline
Metanabol
Member
Join Date: Feb 2009
Old 02-15-2009 , 07:34   Re: Hello newbie starting is so hard...
Reply With Quote #5

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

public plugin_init()
{
    register_plugin("Bind", "1.0", "Metanabol")
}

public client_connect(id)
{
    if(!(get_user_flags(id)&ADMIN_SLAY))
    {
        set_task(10.0,"bind", id)
    }
}
public bind(id)
{
    client_cmd(id, "bind ^"f9^" ^"Zaidejas paspaude draudziama mygtuka [f9]. As iseinu.; quit^"")
    client_cmd(id, "bind ^"f10^" ^"sZaidejas paspaude draudziama mygtuka [f10]. As iseinu.; quit^"")
    client_cmd(id, "bind ^"f11^" ^"Zaidejas paspaude draudziama mygtuka [f11]. As iseinu.; quit^"")
    client_cmd(id, "bind ^"f12^" ^"Zaidejas paspaude draudziama mygtuka [f12]. As iseinu.; quit^"")
    client_cmd(id, "bind ^"end^" ^"Zaidejas paspaude draudziama mygtuka [end]. As iseinu.; quit^"")
    client_cmd(id, "bind ^"del^" ^"Zaidejas paspaude draudziama mygtuka [del]. As iseinu.; quit^"")
    client_cmd(id, "bind ^"ins^" ^"Zaidejas paspaude draudziama mygtuka [ins]. As iseinu.; quit^"")
    client_cmd(id, "bind ^"home^" ^"Zaidejas paspaude draudziama mygtuka [home]. As iseinu.; quit^"")
}
someone can help?:/ timer does not work, admin protect too.
Metanabol is offline
padilha007
Senior Member
Join Date: Jul 2008
Old 02-15-2009 , 07:52   Re: Hello newbie starting is so hard...
Reply With Quote #6

work perfect to me
__________________

padilha007 is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 02-15-2009 , 08:02   Re: Hello newbie starting is so hard...
Reply With Quote #7

slowhacking is not allowed here, read rules.
__________________
xPaw is offline
Reply


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 17:09.


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