Raised This Month: $ Target: $400
 0% 

amx/amxx


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
tarin
Member
Join Date: May 2005
Old 05-30-2005 , 22:25   amx/amxx
Reply With Quote #1

i want to know how i can change this into an amxx plugin

wat do i have to change here

Quote:


/* Another simple silly plugin by {W`C} Bludy

USAGE: amx_revive < part of nick > or < @ team > or < # index > < user health >

Revives player with set amount of health made for fun purposes only!
Announces when player is revived

Warning: You must enter the amount of health you want the player to be revived with
or the user or team will die causing a death and possible team loss. If done correctly
the player will spawn with the given health and the basic weapons given at the start
of the round.

*/


#include <amxmod>

public client_revive(admin_index,victim_index,user_h ealth)

{

new arg1[32]
read_argv(1,arg1,32)

new team[32]
get_user_team(victim_index,team,32)

new name[32]
get_user_name(victim_index,name,32)

if (equal(arg1,"@"))
{
if (equal(team,"CT"))
{
set_hudmessage(0, 0, 200, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)
show_hudmessage(0,"The Counter-Terrorists Have Been Revived!!!")
give_item(victim_index,"weapon_usp")
give_item(victim_index,"ammo_45acp")
give_item(victim_index,"ammo_45acp")
give_item(victim_index,"weapon_knife")
}
else if (equal(team,"TERRORIST"))
{
set_hudmessage(200, 0, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)
show_hudmessage(0,"The Terrorists Have Been Revived!!!")
give_item(victim_index,"weapon_glock18")
give_item(victim_index,"ammo_9mm")
give_item(victim_index,"ammo_9mm")
give_item(victim_index,"weapon_knife")
}
}
else
{
set_hudmessage(0, 200, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)
show_hudmessage(0,"%s Has Been Revived!!!",name)
}

user_spawn(victim_index)
set_user_health(victim_index,user_health)

return PLUGIN_CONTINUE
}



public admin_revive(id)
{


if (!(get_user_flags(id)&ADMIN_LEVEL_A)){
client_print(id,print_console,"[AMX] You have no access to that command")
return PLUGIN_HANDLED
}
new argc = read_argc()
if (argc < 3)
{
client_print(id,print_console,"[AMX] Usage: amx_revive < part of nick > or < @ team > or < # index > < user health >")
return PLUGIN_HANDLED
}

new arg1[32]
new arg2[32]
new arg3[32]
read_argv(1,arg1,32)
read_argv(2,arg2,32)
read_argv(3,arg3,32)

//Team revive
if (equal(arg1,"@"))
{
new players[32], inum
get_players(players,inum,"e",arg2)
for(new i = 0 ;i < inum ;++i)
client_revive(id,players[i],str_to_num(arg3))
if (inum)
client_print(id,print_console,"[AMX] * All clients from ^"%s^" have been revived *",arg2)
else
client_print(id,print_console,"[AMX] No clients in such team")
}
//Index revive
if (equal(arg1,"#"))
{
if (is_user_connected(str_to_num(arg2)))
client_revive(id,str_to_num(arg2),str_to_num( arg3))
else
client_print(id,print_console,"[AMX] Client not found")

}
//Part of Name revive
else
{
new player = find_player("lb",arg1)
if (player)
client_revive(id,player,str_to_num(arg2))
else
client_print(id,print_console,"[AMX] Client with that part of nick not found")
}
return PLUGIN_HANDLED
}

public plugin_init()
{
register_plugin("Team Revive","0.8.4","{W`C} Bludy")
register_clcmd("amx_revive","admin_revive",AD MIN_LEVEL_A,"amx_revive < part of nick > or < @ team > or < # index > < user health > ")
return PLUGIN_CONTINUE

}



__________________
tarin is offline
n0obie4life
Veteran Member
Join Date: Dec 2004
Old 05-30-2005 , 23:26  
Reply With Quote #2

first change

#include <amxmod>

to

#include <amxmodx>

then compile it and tell us if there is ANY errors.
__________________
Plugins:
none

n0obie4life is offline
tarin
Member
Join Date: May 2005
Old 05-31-2005 , 14:05   amx/amxx
Reply With Quote #3

is that it? or is there more?
__________________
tarin is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 05-31-2005 , 14:33  
Reply With Quote #4

And
Code:
#include <fun>
[...] for the give_item() and set_user_health() functions.
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
cs.war3lt.com
Junior Member
Join Date: May 2005
Old 05-31-2005 , 16:12  
Reply With Quote #5

so what's difrent from amx and amxx ?
__________________
!!! NO WOMANS !!!, visit me at www.userphp.com >- cooming soon
cs.war3lt.com is offline
tarin
Member
Join Date: May 2005
Old 05-31-2005 , 16:41   help!
Reply With Quote #6

when i changed it to this
Quote:

/* AMX Mod script.
* admin_armor by Vectren - [email protected] (Built off the source to f117bomb's admin_heal)
* This file is provided as is (no warranties).
*/

#include <amxmodx>
#include <fun>

/*
* Usage: amx_armor <authid, nick, @team or #userid> <armor to give>
* Examples:
* amx_armor @CT 100 - adds 100 Armor to Counter-Terrorists Team
* amx_armor @TERRORIST 999 - adds 999 armor to the Terrorist team
* amx_armor player 200 - adds 200 armor to player
*/

public admin_armor(id,level,cid) {
if (!cmd_access(id,level,cid,3))
return PLUGIN_HANDLED
new arg[32], arg2[8], name2[32]
read_argv(1,arg,31)
read_argv(2,arg2,7)
get_user_name(id,name2,31)
if (arg[0]=='@'){
new players[32], inum
get_players(players,inum,"ae",arg[1])
if (inum==0){
console_print(id,"No clients in such team")
return PLUGIN_HANDLED
}
for(new a=0;a<inum;++a) {
new user_armor = get_user_armor(players[a])
set_user_armor(players[a], str_to_num(arg2) + user_armor)
}
switch(get_cvar_num("amx_show_activity")) {
case 2: client_print(0,print_chat,"ADMIN %s: set armor on all %s",name2,arg[1])
case 1: client_print(0,print_chat,"ADMIN: set armor on all %s",arg[1])
}
console_print(id,"All clients have set Armor")
}
else {
new player = cmd_target(id,arg,7)
if (!player) return PLUGIN_HANDLED
new user_armor = get_user_armor(player)
set_user_armor(player, str_to_num(arg2) + user_armor)
new name[32]
get_user_name(player,name,31)
switch(get_cvar_num("amx_show_activity")) {
case 2: client_print(0,print_chat,"ADMIN %s: set Armor on %s",name2,name)
case 1: client_print(0,print_chat,"ADMIN: set Armor on %s",name)
}
console_print(id,"Client ^"%s^" has set Armor",name)
}
return PLUGIN_HANDLED
}

public plugin_init() {
register_plugin("Admin Armor","0.9.3","Vectren")
register_concmd("amx_armor","admin_armor",ADM IN_LEVEL_A,"<authid, nick, @team or #userid> <armor to give>")
return PLUGIN_CONTINUE
}
when i tried to compile it and there was 2 errors...
the errors were:
error 017: undefined symbol "cmd_access"
error 017: undefined symbol "cmd_target"
__________________
tarin is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 05-31-2005 , 16:42  
Reply With Quote #7

Code:
#include <amxmisc>
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
tarin
Member
Join Date: May 2005
Old 05-31-2005 , 16:43   ok
Reply With Quote #8

now it works

ty
__________________
tarin is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 05-31-2005 , 16:45  
Reply With Quote #9

No prob..

http://amxmodx.org/funcwiki.php ;)
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
tarin
Member
Join Date: May 2005
Old 05-31-2005 , 16:50   help....
Reply With Quote #10

wat do i have to do here?

Quote:
/*
*
* AMX_FF
* by JustinHoMi
*
*/

#include <amxmodx>
#include <fun>
#include <amxmisc>

public admin_ff(id,level){
if (!(get_user_flags(id)&level)){
console_print(id,"[AMX] You have no access to that command.")
return PLUGIN_HANDLED
}
if (read_argc() < 2){
new ff_cvar = get_cvar_num("mp_friendlyfire")
console_print(id,"[AMX] ^"mp_friendlyfire^" is ^"%i^"",ff_cvar)
return PLUGIN_HANDLED
}

new ff_s[2]
read_argv(1,ff_s,2)
new ff = strtonum(ff_s)

if(ff == 1) {
server_cmd("mp_friendlyfire 1")
console_print(id,"[AMX] Friendly fire is now on")
}
else if(ff == 0) {
server_cmd("mp_friendlyfire 0")
console_print(id,"[AMX] Friendly fire is now off")
}

return PLUGIN_HANDLED
}

public check_ff(id) {
new ff = get_cvar_num("mp_friendlyfire")
if(ff == 1)
client_print(id,print_chat,"[AMX] Friendly fire is on")
else if(ff == 0)
client_print(id,print_chat,"[AMX] Friendly fire is off")
return PLUGIN_HANDLED
}

public plugin_init(){
register_plugin("Admin FF","0.21","JustinHoMi")
register_concmd("amx_ff","admin_ff",ADMIN_CVA R,"< 0/1 >")
register_clcmd("say /ff","check_ff")
register_clcmd("say_team /ff","check_ff")
return PLUGIN_CONTINUE
}
it says i have a error
error 017: undefined symbol strtonum
__________________
tarin 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 16:46.


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