AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Uhhh.. I'm clueless. (https://forums.alliedmods.net/showthread.php?t=63038)

xMalcusx 11-10-2007 10:50

Uhhh.. I'm clueless.
 
Alright, so yeah.. I'm new to the amxx scene and I thought it was fun looking so I thought I would learn and play with it... I followed the instructions to the tutorial... but I keep getting errors that say it won't compile. What did I do wrong?..
Quote:

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

new PLUGIN[] ="Change HP"
new VERSION[] ="1.0"
new AUTHOR[] ="Marlon"


public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_concmd("amx_hp", "cmd_hp", ADMIN_SLAY, "<target> <hp> ")
}
public cmd_hp(id, level, cid)
{
if (!cmd_acess(id, level, cid, 3))
return PLUGIN_HANDLED
new Arg1[24]
new Arg2[4]

read_argv(1, Arg1, 23)
read_argv(2, Arg2, 3)

new Health = str_to_num(Arg2)

if (Arg1[0] == '@')
}
{
new Team = 0
if (equali(Arg1[1], "CT"))
{
Team = 2
} else if (equali(Arg1[1], "T")) {
Team = 1
}
new player[32], num
get_players(players, num)
new i
for (i=0 i<num; i++)
{
if (!Team)
{

set_user_health(players[i], Health)
} else {
if (get_user_team(players[i]) == Team)
{
set_user_health(players[i], Health)
}
}
}
} else {
new player = cmd_target(id, Arg1, 1)
if (!player)
{
console_print(id, "Sorry, player %s was not found!", Arg1)
return PLUGIN_HANDLED
} else {
set_user_health(player, Health)
}
}
{
return PLUGIN_HANDLED
}

YamiKaitou 11-10-2007 10:52

Re: Uhhh.. I'm clueless.
 
Wrong Forum. If you coded it yourself, go to the Scripting Help section. If someone else coded it, ask them to fix it

xMalcusx 11-10-2007 11:23

Re: Uhhh.. I'm clueless.
 
It was in the tutorial, lol. Alright, thanks.


All times are GMT -4. The time now is 01:13.

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