Raised This Month: $ Target: $400
 0% 

What did i do wrong? Help me with this script


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
XunTric
BANNED
Join Date: Jan 2005
Location: Norway/Norge
Old 01-25-2005 , 11:47   What did i do wrong? Help me with this script
Reply With Quote #1

I made (tryed to make) my first script ever today. And of course it dont work . I made a command that allows me to change other peoples name, but it errors when i try to compile it. Can somebody fix it or tell me what i did wrong? I just used a help file, which showed a change hp command. And i tryed to change it to change name instead... Here it is:

Code:
#include <amxmodx> #include <amxmisc> new PLUGIN[]="Change Name" new AUTHOR[]="XunTric" new VERSION[]="1.0" public plugin_init() {     register_plugin(Change Name, 1.0, XunTric)     register_concmd("amx_name", "cmd_name", ADMIN_SLAY, " ") } public cmd_hp(id, level, cid) {     if (!cmd_acces(id, level, cid, 3))         return PLUGIN_HANDLED     new Arg1[24]     new Arf2[4]     read_argv(1, Arg1, 23)     read_argv(2, Arg2, 3)     new Name = str_to_num (Arg2)     if (arg[0] == '@')     {         new Team = 0         if (equali(arg[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; 1<num; 1++)         {              if (!Team)              {                   set_user_name(players[i], Name)              } else {                   if (get_user_team(players[i]) == Team)                   {                        set_user_name(players[i], Name)                   }                   }          }         } else {                 new player = cmd_target(id, arg1, 1)         if (!player)         {              console_print (id, ""Sorry, player %s could not be found or targetted!", Arg1)              retrun PLUGIN_HANDLED             } else {              set_user_name(player, Name)         }           return PLUGIN_HANDLED     }
XunTric is offline
 


Thread Tools
Display Modes

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 19:18.


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