Raised This Month: $51 Target: $400
 12% 

multy-restart and multy slap plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mitza_draku
Junior Member
Join Date: Jul 2006
Old 09-25-2007 , 09:18   multy-restart and multy slap plugin
Reply With Quote #1

ok, like in the threads title i want 2 plugins.
1. multy restart
ive saw an amx plugin with which you can do some thing like this:
amx_restart 3 3 and the game will be restarted 3 times, with 3 seconds delay. i also want something like amx_restart 3 1,3,5 that restarts the map 3 times with 1, 3 and 5 seconds. i would want one that i can have any value for delay and restart times (so not a preset multy time restarter).
2. multy slap
a command like amx_slap name/id dmg times and it should slap the player X times with Y dmg each.

thanks and i hope those were not done until now
mitza_draku is offline
Styles
Veteran Member
Join Date: Jul 2004
Location: California
Old 09-25-2007 , 13:48   Re: multy-restart and multy slap plugin
Reply With Quote #2

Okay here you go. There is already a plugin for "multi slap" Search.

I made one for fun. I didn't even bother registering the plugin. I don't even know if it works. I dont care eathier. It gave me something to do for 5 mins.
You can try it...

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

public plugin_init()
{
	register_concmd("amx_slap2","multiSlap",ADMIN_SLAY,"<user> <damage> <times to slap>")
}

public multiSlap(id)
{
	new Arg1[33], Arg2[33], Arg3[33], counter
	read_argv(1, Arg1, 32)
	read_argv(2, Arg2, 32)
	read_argv(3, Arg3, 32)

	new Player = cmd_target(id, Arg1, 3)
	new Damage = str_to_num(Arg2)
	new Number = str_to_num(Arg3)

	if(!is_user_connected(iPlayer))
		return PLUGIN_HANDLED

	if(!is_user_alive(Player))
	{
		console_print(id, "[AMXX] That player is not alive.")
		return PLUGIN_HANDLED
	}

	if(Number < 1)
	{
		console_print(id, "[AMXX] Please enter a number greater than 0.")
		return PLUGIN_HANDLED
	}

	if(counter < Number)
	{
		user_slap(Player, Damage)
		counter++
	}
	return PLUGIN_HANDLED
}
Styles is offline
Send a message via AIM to Styles
mitza_draku
Junior Member
Join Date: Jul 2006
Old 09-25-2007 , 15:25   Re: multy-restart and multy slap plugin
Reply With Quote #3

thx, ill test it tommorrow. i want one more thing in this plugin. when the admins uses the command it shoul write in chat "[AMXX]Admin X slaped Y Z times with Q damage."

and about the rr plugin ... i have one but is for amx and i dont know if i can make a rr with diferent delays. ill post the source tomorrow.


btw thx again

edit: ive tested it ... but there is a problem. it slaps the correct damage but only one time. and if i type only amx_slap2 it doesnt say "usage bla bla" it says that there is no player with that name .

the rr plugin source is :
Code:
   /* AMX Mod script.
   *
   * (c) Copyright 2002-2003, f117bomb
   * This file is provided as is (no warranties).
   */
   #include <amxmod>
   #include <amxmisc>
   /*
   * amx_rr <restart times> <delay>
   *
   */
   public drestart(param[])
       set_cvar_string("sv_restart",param)
   public admin_rr(id, level, cid) {
       if (!cmd_access(id, level, cid, 3))
           return PLUGIN_HANDLED
       new sdelay[4], stimes[4]
       read_argv(1,stimes,3)
       read_argv(2,sdelay,3)
       new delay = strtonum(sdelay)
       new times = strtonum(stimes)
       for(new a = times;a > 0;--a)
           set_task( float(delay * a) + 1.0 , "drestart", 0, sdelay, 4)
       client_print(0, print_chat, "The  Game  will  restart %d times with a %d sec. delay between restarts",times,delay)
       return PLUGIN_HANDLED
   }
   public plugin_init() {
       register_plugin("Admin RestartRound","0.9.2","f117bomb")
       register_concmd("amx_rr","admin_rr",ADMIN_LEVEL_A,"<restart times> <delay>")
       return PLUGIN_CONTINUE
   }
the plugin works correctly with amxx with the amxmod compatibility plugin. but i want to add the name of the admin who restarted the map in print_chat ... can you help me with this ? thx

Last edited by mitza_draku; 09-26-2007 at 13:09.
mitza_draku 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 09:10.


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