AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Hitzones (https://forums.alliedmods.net/showthread.php?t=17133)

PM 08-26-2005 10:13

Hitzones
 
Since i am on the roll with making small plugins i am making a new one.
But i got an few warnings again. And i dont know how to fix them. So please help me out a little bit. :D

Code:
/******************************************************************** *  AMXMOD X script.                                                 * *                                                                   * *  Discription: You can set hitpoints on a player.                  * *  For example the head. Now every player that shoots.              * *  The player will only get headshots.                              * ********************************************************************/ #include <amxmodx> #include <fun> #include <cstrike> #include <amxmisc> new PLUGIN[]="Pwned" new AUTHOR[]="B0oGeYm4n" new VERSION[]="1.00" public plugin_init() {      register_plugin(PLUGIN, VERSION, AUTHOR)      register_concmd("amx_pwn", "cmd_pwn", ADMIN_SLAY, "<Target> <hitzone>")       } public cmd_pwn(id, level, cid) {      if (!cmd_access(id, level, cid, 3))         return PLUGIN_HANDLED      new Arg1[24]      new Arg2[4]            read_argv(1, Arg1, 23)      read_argv(2, Arg2, 3)            new Float:Hitzones = floatstr(Arg2)            if (Arg1[0] == '@')      {           new Team = 0           if (equali(Arg1[1], "CT"))           {                Team = 2           } else if (equali(Arg1[1], "T")) {                Team = 1           }           new players[32], num           get_players(players, num)           new i           for (i=0; i<num; i++)           {                if (!Team)                {                     set_user_hitzones(players[i], Hitzones)                } else {                     if (get_user_team(players[i]) == Team)                     {                          set_user_hitzones(players[i], Hitzones)                     }                }           }      } else {           new player = cmd_target(id, Arg1, 1)           if (!player)           {                console_print(id, "[AMXX] The player could not be found", Arg1)                return PLUGIN_HANDLED           } else {                set_user_hitzones(player, Hitzones)           }      }      return PLUGIN_HANDLED }
Do Your Magic Oh Mighty Scripters :D

EDIT: I get these errors
Code:

/home/groups/amxmodx/tmp/php2vs2Gk.sma(56) : warning 213: tag mismatch
/home/groups/amxmodx/tmp/php2vs2Gk.sma(60) : warning 213: tag mismatch
/home/groups/amxmodx/tmp/php2vs2Gk.sma(71) : warning 213: tag mismatch

3 Warnings.


DataMatrix 08-26-2005 10:37

Seems to me as if it cant find set_user_hitzones in the includes, but hell, what do I know?

PM 08-26-2005 10:43

Well if i am correct the fun module supports set_user_hitzones so i dont think that could be the problem :?

Freecode 08-26-2005 10:57

can u specify in ur code which lines are 56,60,71

PM 08-26-2005 11:35

I dont understand you. Ima noob at scripting

Proach 08-26-2005 11:41

ther error lines are 56,60,71
freecode asks you if you can show us what line 56,60,71 contain

Zenith77 08-26-2005 11:43

instead of using Hitzones try acutally using numbers..thats the prob..

it should be like

set_user_hitzones(player, 1, 0) or something like that


look in funcwiki ;)

PM 08-26-2005 11:48

Im looking in the function part all day long :wink:

Freecode 08-26-2005 12:04

why is hitzones a float?

PM 08-26-2005 12:08

I dunno i told you guys im just a beginner


All times are GMT -4. The time now is 14:30.

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