Raised This Month: $ Target: $400
 0% 

can anyone help? (again)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
silversinner
Member
Join Date: Feb 2006
Location: England
Old 03-02-2006 , 11:33   can anyone help? (again)
Reply With Quote #1

Right as you know im new to scripting i only really know simple plugin (like kick plugins) and im just looking for info to store in my brain!

I've been working on a new plugin for my friend! i call it hacker abuse!
all it does is count down from 5 to 0 after 0 it starts abusing! after abuse it bans them! Now i've put in the ban cmd at the end
Code:
new ip [16] { 
        get_user_ip(id, ip, 15, 1) 
        server_cmd("kick #%d ^"You have been banned for Hacking!.^"", get_user_userid(id)) 
        server_exec() 
        server_cmd("addip 5 ^"%s^"", ip)  
        server_print("[AMXX] HaCkEr AbUsEd & BaNnEd!")
}
(This is the code a guy told me on my other topic cheers)

I need to know 2 things if i add:
Code:
set_task(1.0,"ip")
and then the ban code at the bottom:
Code:
 new ip [16] { 
        get_user_ip(id, ip, 15, 1) 
        server_cmd("kick #%d ^"You have been banned for Hacking!.^"", get_user_userid(id)) 
        server_exec() 
        server_cmd("addip 5 ^"%s^"", ip)  
        server_print("[AMXX] HaCkEr AbUsEd & BaNnEd!")
}
Will it pick up on the fact i want it to exicute that code after so&so amount of seconds. If not how do i do it? (I've looked everywere for tutorials so this is my last resort)

My second question is: If i want to add another code. that i want it to exicute amx_uberslap would it be this: (after adding set_task(0.0,"uberslap")

Code:
public uberslap [16] { 
        get_user_ip(id, ip, 15, 1) 
        server_cmd("amx_uberslap", get_user_userid(id))       
        server_print("[AMXX] HaCkEr AbUsEd & BaNnEd!")
Now i know i will have to add end tags ect... but all i need is a code that will enable me to do this

i know this may seem.... weird but i have searched high and low on the net for tutorials on this paticlur subject but havnt found any!

If you could help! id really appreciate it !

silversinner
__________________
My website
(under contruction)
silversinner is offline
Send a message via AIM to silversinner Send a message via MSN to silversinner Send a message via Yahoo to silversinner
Werewolf
Senior Member
Join Date: Jan 2006
Location: Sweden
Old 03-02-2006 , 12:39  
Reply With Quote #2

You could send whole sma file in 1 code "block" so we can see whole code. Would be easier to help then.[/code]
Werewolf is offline
silversinner
Member
Join Date: Feb 2006
Location: England
Old 03-02-2006 , 13:15  
Reply With Quote #3

Ok this is what i have so far (this is my first attempt at making a plugin, may expect lots of mistakes )

Code:
//Hacker abuse v0.1 - Silversinner
//with help from VEN

#include <amxmodx>
#include <amxmisc>




public plugin_init() {
	register_plugin("HaCkEr AbUsE","0.1","Silversinner")
	register_concmd("amx_hacker_attack","hackerattack",ADMIN_BAN," - Punishes hackers then bans them")
}
  	
public hackerattack(id) {
	if (!(get_user_flags(id)&ADMIN_LEVEL_A)) {
		console_print(id,"[AMXX] Access Denied!")
		return PLUGIN_HANDLED
}
	if (read_argc() == 0) { 
        console_print(id,"[AMXX] You must specify a user") 
        return PLUGIN_HANDLED 
    } 
     
     new user[32], uid  
    read_argv(1,user,32) 
    uid = find_player("bh",user) 
    if (uid == 0) { 
        console_print(id,"[AMXX] Invalid User Id") 
        return PLUGIN_HANDLED 
}
	set_task(0.0,"alert")
	set_task(1.0,"five")
	set_task(2.0,"four")
	set_task(3.0,"three")
	set_task(4.0,"two")
	set_task(5.0,"one")
	set_task(6.0,"zero")
	set_task(7.0,"slap")
	set_task(8.0,"fire")
	set_task(16.0,"ban")
	return PLUGIN_HANDLED
}

public alert() {
	client_print(0,print_chat,"***** ALERT! HACKER DETECTED!")
	server_print("[AMXX] ***** ALERT! HACKER DETECTED! *****")
	client_cmd(0,"spk ^"fvox/warning.wav^"") 
}


public five() {
	client_print(0,print_chat,"[AMXX] HaCkEr AbUsE in 5....")
	server_print("[AMXX] HaCkEr AbUsE in 5....")

	client_cmd(0,"spk ^"fvox/five.wav^"") 
}

public four() {
	client_print(0,print_chat,"[AMXX] HaCkEr AbUsE in 4....")
	server_print("[AMXX] HaCkEr AbUsE in 4....")

	client_cmd(0,"spk ^"fvox/four.wav^"") 
}

public three() {
	client_print(0,print_chat,"[AMXX] HaCkEr AbUsE in 3....")
	server_print("[AMXX] HaCkEr AbUsE in 3....")

	client_cmd(0,"spk ^"fvox/three.wav^"") 
}

public two() {
	client_print(0,print_chat,"[AMXX] HaCkEr AbUsE in 2....")
	server_print("[AMXX] HaCkEr AbUsE in 2....")
 
	client_cmd(0,"spk ^"fvox/two.wav^"") 
}

public one() {
	client_print(0,print_chat,"[AMXX] HaCkEr AbUsE in 1....")
	server_print("[AMXX] HaCkEr AbUsE in 1....")

	client_cmd(0,"spk ^"fvox/one.wav^"") 
}

public zero() {
	client_print(0,print_chat,"[AMXX] HaCkEr AbUsEd....")
	server_print("[AMXX] HaCkEr AbUsing!")

	client_cmd(0,"spk ^"fvox/safe_day.wav^"") 
}

public slap() { 
                              get_user_ip(id, ip, 15, 1) 
                              client_print(0,print_chat,"[AMXX] AbUsEd hacker"
                              server_cmd("amx_uberslap", get_user_userid(id)) 
}

public fire (){
                             get_user_ip(id, ip, 15, 1) 
                             client_print(0,print_chat,"[AMXX] AbUsEd hacker MoRe!!"
                             server_cmd("amx_fire", get_user_userid(id)) 
}

public ban (16) {
        get_user_ip(id, ip, 15, 1) 
        server_cmd("kick #%d ^"You have been banned for Hacking!.^"", get_user_userid(id)) 
        server_exec() 
        server_cmd("addip 5 ^"%s^"", ip)  
        server_print("[AMXX] HaCkEr AbUsEd & BaNnEd!") 
}
Now i havnt compiled it yet... im not even sure is its correct :s
__________________
My website
(under contruction)
silversinner is offline
Send a message via AIM to silversinner Send a message via MSN to silversinner Send a message via Yahoo to silversinner
VEN
Veteran Member
Join Date: Jan 2005
Old 03-02-2006 , 13:15  
Reply With Quote #4

Please, use instead of tags.
VEN is offline
silversinner
Member
Join Date: Feb 2006
Location: England
Old 03-02-2006 , 13:17  
Reply With Quote #5

:s ok...

bit late i post again
__________________
My website
(under contruction)
silversinner is offline
Send a message via AIM to silversinner Send a message via MSN to silversinner Send a message via Yahoo to silversinner
silversinner
Member
Join Date: Feb 2006
Location: England
Old 03-02-2006 , 13:18  
Reply With Quote #6

Code:
//Hacker abuse v0.1 - Silversinner //with help from VEN #include <amxmodx> #include <amxmisc> public plugin_init() {     register_plugin("HaCkEr AbUsE","0.1","Silversinner")     register_concmd("amx_hacker_attack","hackerattack",ADMIN_BAN," - Punishes hackers then bans them") }     public hackerattack(id) {     if (!(get_user_flags(id)&ADMIN_LEVEL_A)) {         console_print(id,"[AMXX] Access Denied!")         return PLUGIN_HANDLED }     if (read_argc() == 0) {         console_print(id,"[AMXX] You must specify a user")         return PLUGIN_HANDLED     }            new user[32], uid       read_argv(1,user,32)     uid = find_player("bh",user)     if (uid == 0) {         console_print(id,"[AMXX] Invalid User Id")         return PLUGIN_HANDLED }     set_task(0.0,"alert")     set_task(1.0,"five")     set_task(2.0,"four")     set_task(3.0,"three")     set_task(4.0,"two")     set_task(5.0,"one")     set_task(6.0,"zero")     set_task(7.0,"slap")     set_task(8.0,"fire")     set_task(16.0,"ban")     return PLUGIN_HANDLED } public alert() {     client_print(0,print_chat,"***** ALERT! HACKER DETECTED!")     server_print("[AMXX] ***** ALERT! HACKER DETECTED! *****")     client_cmd(0,"spk ^"fvox/warning.wav^"") } public five() {     client_print(0,print_chat,"[AMXX] HaCkEr AbUsE in 5....")     server_print("[AMXX] HaCkEr AbUsE in 5....")     client_cmd(0,"spk ^"fvox/five.wav^"") } public four() {     client_print(0,print_chat,"[AMXX] HaCkEr AbUsE in 4....")     server_print("[AMXX] HaCkEr AbUsE in 4....")     client_cmd(0,"spk ^"fvox/four.wav^"") } public three() {     client_print(0,print_chat,"[AMXX] HaCkEr AbUsE in 3....")     server_print("[AMXX] HaCkEr AbUsE in 3....")     client_cmd(0,"spk ^"fvox/three.wav^"") } public two() {     client_print(0,print_chat,"[AMXX] HaCkEr AbUsE in 2....")     server_print("[AMXX] HaCkEr AbUsE in 2....")       client_cmd(0,"spk ^"fvox/two.wav^"") } public one() {     client_print(0,print_chat,"[AMXX] HaCkEr AbUsE in 1....")     server_print("[AMXX] HaCkEr AbUsE in 1....")     client_cmd(0,"spk ^"fvox/one.wav^"") } public zero() {     client_print(0,print_chat,"[AMXX] HaCkEr AbUsEd....")     server_print("[AMXX] HaCkEr AbUsing!")     client_cmd(0,"spk ^"fvox/safe_day.wav^"") } public slap() {                               get_user_ip(id, ip, 15, 1)                               client_print(0,print_chat,"[AMXX] AbUsEd hacker"                               server_cmd("amx_uberslap", get_user_userid(id)) } public fire (){                              get_user_ip(id, ip, 15, 1)                              client_print(0,print_chat,"[AMXX] AbUsEd hacker MoRe!!"                              server_cmd("amx_fire", get_user_userid(id)) } public ban (16) {         get_user_ip(id, ip, 15, 1)         server_cmd("kick #%d ^"You have been banned for Hacking!.^"", get_user_userid(id))         server_exec()         server_cmd("addip 5 ^"%s^"", ip)           server_print("[AMXX] HaCkEr AbUsEd & BaNnEd!") }
__________________
My website
(under contruction)
silversinner is offline
Send a message via AIM to silversinner Send a message via MSN to silversinner Send a message via Yahoo to silversinner
Werewolf
Senior Member
Join Date: Jan 2006
Location: Sweden
Old 03-02-2006 , 13:32  
Reply With Quote #7

Biggest problem is = id and ip is undefined!
And after that it is only some small edits you have to do.
Here is the code so far.
Code:
//Hacker abuse v0.1 - Silversinner //with help from VEN #include <amxmodx> #include <amxmisc> public plugin_init() {    register_plugin("HaCkEr AbUsE","0.1","Silversinner")    register_concmd("amx_hacker_attack","hackerattack",ADMIN_BAN," - Punishes hackers then bans them") }       public hackerattack(id) {    if (!(get_user_flags(id)&ADMIN_LEVEL_A) ) {       console_print(id,"[AMXX] Access Denied!")       return PLUGIN_HANDLED }    if (read_argc() == 0) {         console_print(id,"[AMXX] You must specify a user")         return PLUGIN_HANDLED     }         new user[32],uid       read_argv(1, user, 32)     uid = find_player("bh",user)     if (uid == 0) {         console_print(id,"[AMXX] Invalid User Id")         return PLUGIN_HANDLED }    set_task(0.0,"alert")    set_task(1.0,"five")    set_task(2.0,"four")    set_task(3.0,"three")    set_task(4.0,"two")    set_task(5.0,"one")    set_task(6.0,"zero")    set_task(7.0,"slap")    set_task(8.0,"fire")    set_task(16.0,"ban")    return PLUGIN_HANDLED } public alert() {    client_print(0,print_chat,"***** ALERT! HACKER DETECTED!")    server_print("[AMXX] ***** ALERT! HACKER DETECTED! *****")    client_cmd(0,"spk ^"fvox/warning.wav^"") } public five() {    client_print(0,print_chat,"[AMXX] HaCkEr AbUsE in 5....")    server_print("[AMXX] HaCkEr AbUsE in 5....")    client_cmd(0,"spk ^"fvox/five.wav^"") } public four() {    client_print(0,print_chat,"[AMXX] HaCkEr AbUsE in 4....")    server_print("[AMXX] HaCkEr AbUsE in 4....")    client_cmd(0,"spk ^"fvox/four.wav^"") } public three() {    client_print(0,print_chat,"[AMXX] HaCkEr AbUsE in 3....")    server_print("[AMXX] HaCkEr AbUsE in 3....")    client_cmd(0,"spk ^"fvox/three.wav^"") } public two() {    client_print(0,print_chat,"[AMXX] HaCkEr AbUsE in 2....")    server_print("[AMXX] HaCkEr AbUsE in 2....")      client_cmd(0,"spk ^"fvox/two.wav^"") } public one() {    client_print(0,print_chat,"[AMXX] HaCkEr AbUsE in 1....")    server_print("[AMXX] HaCkEr AbUsE in 1....")    client_cmd(0,"spk ^"fvox/one.wav^"") } public zero() {    client_print(0,print_chat,"[AMXX] HaCkEr AbUsEd....")    server_print("[AMXX] HaCkEr AbUsing!")    client_cmd(0,"spk ^"fvox/safe_day.wav^"") } public slap() {                               get_user_ip(id, ip, 15, 1)                               client_print(0,print_chat,"[AMXX] AbUsEd hacker")                               server_cmd("amx_uberslap", get_user_userid(id) ) } public fire (){                              get_user_ip(id, ip, 15, 1)                              client_print(0,print_chat,"[AMXX] AbUsEd hacker MoRe!!")                              server_cmd("amx_fire", get_user_userid(id) ) } public ban (16) {         get_user_ip(id, ip, 15, 1)         server_cmd("kick #%d ^"You have been banned for Hacking!.^"", get_user_userid(id) )         server_exec()         server_cmd("addip 5 ^"%s^"", ip)           server_print("[AMXX] HaCkEr AbUsEd & BaNnEd!") }
Werewolf is offline
silversinner
Member
Join Date: Feb 2006
Location: England
Old 03-02-2006 , 13:33  
Reply With Quote #8

How do i define it properly?
__________________
My website
(under contruction)
silversinner is offline
Send a message via AIM to silversinner Send a message via MSN to silversinner Send a message via Yahoo to silversinner
Werewolf
Senior Member
Join Date: Jan 2006
Location: Sweden
Old 03-02-2006 , 13:41  
Reply With Quote #9

Actually... I've only created superheroes for superheromod so far, and some small plugins. Not released though, but on my plugins. Created one named weapongiver, but anyways. I just added id to my plugins and woilla it worked. id is an index by the way. I'm working on it now anyways.

*Some minutes later*
Can't make it work.
And why do you use the amx_uberslap and the amx_fire?
Some people doesn't have amx_uberslap and amx_fire.
Eg. Me
Werewolf is offline
silversinner
Member
Join Date: Feb 2006
Location: England
Old 03-02-2006 , 13:43  
Reply With Quote #10

Ok thank you. I coulndt see any other way to get it to use amx_uberslap & amx_fire one after another and then 11 seconds l8r amx_banid ect ect
__________________
My website
(under contruction)
silversinner is offline
Send a message via AIM to silversinner Send a message via MSN to silversinner Send a message via Yahoo to silversinner
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 20:21.


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