Raised This Month: $ Target: $400
 0% 

What is wrong with my code?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
OneMoreLevel
Senior Member
Join Date: Aug 2009
Location: Look behind you... Very
Old 10-31-2009 , 13:54   What is wrong with my code?
Reply With Quote #1

PHP Code:
/* Plugin made by OneMoreLevel */
/* Any modification to this code is illegal
unless told so by the author. */
//////////////////////////////////////////////////////////////////////////////////////////
//  ChangeLog
// Version 1.1, Public release.
//-- Made the base of the plugin, and made it multilingual
//
//
//
//
//
//
//
//
//
//
//
//
////////////////////////////////////////////////////////////////////////////////////////////
//  CVARS
// SPY_Cost --- This is how much the spy Costs, default = 5000.
// PLUGIN_TOGGLE --- Toggle the plugin, default 1 (on)

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#define PLUGIN "TF2 Spy"
#define VERSION "1.1"
#define AUTHOR "OneMoreLevel"
new spyToggle,spyCost;

public 
plugin_init() {
 
register_plugin("TF2 Spy""1.1""OneMoreLevel")
 
 
register_clcmd("say !spy" "Say_spy")
 
register_clcmd("say_team !spy" "Say_spy")
 
register_clcmd("say !abilities","plugin_menu")
 
 
spyToggle register_cvar("PLUGIN_TOGGLE""1");
 
spyCost register_cvar("SPY_Cost""5000");
 
 
register_dictionary"TF2Dictionary.txt")
 
}
public 
Say_spy (id) {
 if (
is_user_alive(id))
 {
  
client_print(0print_chat"%L"LANG_SERVER"TYPE_SPY")
  if (
cs_get_user_money(id)) > (get_pcvar_num(spyCost))
  
cs_set_user_money(idcs_get_user_money,(id) - (get_pcvar_num(spyCost));
  
strip_user_weapons(id)
  
client_printidprint_chat"%L"LANG_SERVER"NOW_SPY"// Free Multi-lingual advertising :D
 
}
 else if (
cs_get_user_money(id)) < (get_pcvar_num(spyCost))
 {
  
client_printidprint_chat"%L"LANG_SERVER"NOT_ENOUGH_MONEY")
 }
 else if (!
is_user_alive(id))
 {
  
client_printidprint_chat"%L"LANG_SERVER"CANNOT_SPY")
 }
 
}
public 
plugin_menu (id) {
 
 new 
menu menu_create("\rTF2 Spy Abilities""menu_handler");
 
 
menu_additem(menu"\wTeam Camo - Look like the other team""1"0);
 
menu_additem(menu"\wEnviroment Camo - Grass suit""2"0);
 
menu_additem(menu"\wPartial Invisibility - 75% Invis.""3"0);
 
 
 
menu_setprop(menuMPROP_EXITMEXIT_ALL);
 if (
is_user_alive(id))
  
menu_display(idmenu0);
 else
 {
  
client_printidprint_console"%L"LANG_SERVER"SPY_DEAD")
 }
}
public 
menu_handler(idmenuitem)
{
 if (
item == MENU_EXIT )
 { 
  
menu_destroy(menu);
 }
 
 
 
// Here are the data functions and variables
 
new data[6], iName[64];
 new 
accesscallback;
 
menu_item_getinfo(menuitemaccessdata,5iName63callback);
 new 
key str_to_num(data);
 
 switch(
key)
 {
  case 
1:
  {
   
// Print the message and destroy the menu
   
if ( get_user_teamid ) == // CT?
   
{
    (
strip_user_weapons(id))
    
cs_set_user_teamidCS_TEAM_CTCS_T_LEET ); 
    
menu_destroy(menu);
   }
   else if( 
get_user_teamid ) == // T?
   
{
    (
strip_user_weapons(id))
    
cs_set_user_teamidCS_TEAM_TCS_CT_GIGN ); 
    
menu_destroy(menu);
    
   }
   
menu_destroy(menu);
  }
  
  case 
2:
  {
   
   
menu_destroy(menu);
  }
  
  case 
3:
  {
   if ( 
get_user_teamid ) == )
   {
    (
strip_user_weapons(id))
    
cs_set_user_teamidCS_TEAM_CTCS_CT_GIGN ); 
    
set_user_rendering(idkRenderFxGlowShell000kRenderTransAlpha65)
    
menu_destroy(menu);
   }
   else if( 
get_user_teamid ) == )
   {
    (
strip_user_weapons(id))
    
cs_set_user_teamidCS_TEAM_TCS_T_LEET ); 
    
set_user_rendering(idkRenderFxGlowShell000kRenderTransAlpha65)
    
menu_destroy(menu);
    
   }
   
menu_destroy(menu);
  }
  
 }
 
 
// Kill the menu, and make a return.
 
menu_destroy(menu);
 return 
PLUGIN_HANDLED;
}
public 
client_connect(id) {
 
client_printidprint_console"%L"LANG_SERVER"WELCOME_MSG")
 
client_printidprint_chat"%L"LANG_SERVER"WELCOME_MSG")
}
public 
client_disconnect(id) {
 
client_printidprint_console"%L"LANG_SERVER"GOODBYE_MSG")
 
client_printidprint_chat"%L"LANG_SERVER"GOODBYE_MSG")
}
/////////////////////////////////
//  To Do?
//-- Make "feign death" option
//-- Ad no footsteps
//-- Knife model?
//
//
//
//
//
//
//
//
//
////////////////////////////////// 
I get a few errors with this, anybody know what it is?

(I know I dont use One of the variables yet.)
__________________
60/100 60%
[||||||||||||||||||||]
Project: Warfighter mod
Blog:
http://sites.google.com/site/dailymultitasker/
PHP Code:
   if ( i_help_you "Yes" ) == )
    
set_user_karma(onemorelevel,add,+1
OneMoreLevel 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 17:47.


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