AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   plugin compiles but doesn't work. (https://forums.alliedmods.net/showthread.php?t=89630)

dragonbolt 04-08-2009 16:57

plugin compiles but doesn't work.
 
i need help the plugin compiles but doesn't work.if someone could rewrite this it would be helpful.

PHP Code:

 
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <engine>
#include <fakemeta>
new mod_name[32] = "WARFAREGAMERS"
new bool:buying
new hudsync
#define PLUGIN "Warfare Gamers"
#define AUTHOR "WarLord"
#define VERSION "1.5"
 
//Sets the sky you want for your server
#define SKYNAME "space"
#define Keysmenu_1 (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<9)
#define fm_find_ent_by_class(%1,%2) engfunc(EngFunc_FindEntityByString, %1, "classname", %2)
#define SLOT_PRIMARY 1
#define SLOT_SECONDARY 2
#define SLOT_KNIFE 3
#define SLOT_GRENADE 4
#define SLOT_C4 5
#define PRIMARY_WEAPONS_BIT_SUM ((1<<CSW_SCOUT)|(1<<CSW_XM1014)|(1<<CSW_MAC10 )|(1<<CSW_AUG)|(1<<CSW_UMP45)|(1<<CSW_SG550)| (1<<CSW_GALIL)|(1<<CSW_FAMAS)|(1<<CSW_AWP)|(1 <<CSW_MP5NAVY)|(1<<CSW_M249)|(1<<CSW_M3)|(1<< CSW_M4A1)|(1<<CSW_TMP)|(1<<CSW_G3SG1)|(1<<CSW _SG552)|(1<<CSW_AK47)|(1<<CSW_P90))
#define SECONDARY_WEAPONS_BIT_SUM ((2<<CSW_P22[IMG]http://forums.alliedmods.net/images/smilies/cool.gif[/IMG]|(2<<CSW_ELITE)|(2<<CSW_FIVESEV EN)|(CSW_USP)|(1<<CSW_GLOCK1[IMG]http://forums.alliedmods.net/images/smilies/cool.gif[/IMG]|(1<<CSW_DEAGLE ))
stock g_WeaponSlots[] = { 02014151142211112211111,142113}
stock g_MaxBPAmmo[] = { 05209013211009011201001009090901001203012020021901209023590900100 }
public 
plugin_init() 
{
register_plugin(PLUGINVERSIONAUTHOR)
 
register_cvar(PLUGIN,VERSION,FCVAR_SERVER)
 
register_dictionary("warfaregamers.txt")
 
register_logevent("logevent_round_start",2"1=Round_Start")
register_logevent("logevent_round_end"2"1=Round_End"
 
register_forward(FM_ClientUserInfoChanged,"fw _info")
register_forward(FM_PlayerPostThink,"fw_postt hink")
register_forward(FM_Touch,"fw_Touch");
register_forwardFM_EmitSound"fw_EmitSound" )
register_forward(FM_CmdStart"fw_Cmd")
register_forward(FM_GetGameDescription,"GameD esc")
 
 
register_event("ResetHUD","event_hud_reset""be")
register_event("TextMsg","event_restart_attem pt""a""2=#Game_will_restart_in")
register_event("CurWeapon","event_cur_weapon" ,"be""1=1")
register_event("Damage","event_damage_scream" ,"be","2!0","3=0"
register_event("Damage""event_damage""be""2!0","3=0","4!0")
register_event("HLTV""event_new_round""a""1=0""2=0")
 
server_cmd("sv_skyname %s"SKYNAME)
server_cmd("sv_maxspeed 1000")
 
register_clcmd("say","clcmd_say_extra")
register_clcmd("say","clcmd_say")
 
register_clcmd("fullupdate","clcmd_fullupdate "
 
 
register_menucmd(register_menuid("Buy Menu"), Keysmenu_1"buy_menu")
 
format(mod_name31"WARAREGAMERS %s"VERSION)
hudsync CreateHudSyncObj() 
 
return 
PLUGIN_CONTINUE
}
public 
GameDesc() 

forward_return(FMV_STRINGmod_name)
 
return 
FMRES_SUPERCEDE
}
public 
plugin_precache() {
precache_model("models/player/admin_ct/admin_ct.mdl")
precache_model("models/player/admin_t/admin_t.mdl")
return 
PLUGIN_CONTINUE
}
public 
resetModel(idlevelcid) {
if (
get_user_flags(id) & ADMIN_KICK) {
new 
CsTeams:userTeam cs_get_user_team(id)
if (
userTeam == CS_TEAM_T) {
cs_set_user_model(id"admin_t")
}
else if(
userTeam == CS_TEAM_CT) {
cs_set_user_model(id"admin_ct")
}
return 
PLUGIN_HANDLED
}
return 
PLUGIN_CONTINUE
}
public 
clcmd_say(id)
{
if ( !
is_user_alive(id) )
return 
PLUGIN_HANDLED
 
static ARGS[15]
read_args(ARGS,14)
 
remove_quotes(ARGS)
 
if(
equali(ARGS,"/info"))
{
info(id)
}
else if (
equali(ARGS,"/bm"))
{
if ( !
is_user_alive(id) )
{
client_print(idprint_center"%L"id"BUY_ALIVE")
return 
PLUGIN_HANDLED
}
else if ( !
cs_get_user_buyzone(id) )
{
client_print(idprint_center"%L"id"BUY_BUYZONE")
return 
PLUGIN_HANDLED
}
else if (!
buying)
{
new 
Float:time_buy get_cvar_float("mp_buytime") * 600
client_print
(idprint_center"%L"id"BUY_TIME"floatround(time_buy))
return 
PLUGIN_HANDLED
}
else
{
show_menu(idKeysmenu_1"\yBuy Menu\w^n^n1. .40 Dual Elites \y($1000)\w^n2. IDF Defender \y($2800)\w^n3. CV-47 \y($3500)\w^n4. M4A1 \y($3500)\w^n^n0. Exit"

}
return 
PLUGIN_CONTINUE
 
}
 
public 
clcmd_say_extra(id)
{
if ( !
is_user_alive(id) )
return 
PLUGIN_HANDLED
 
static ARGS[15]
read_args(ARGS,14)
 
remove_quotes(ARGS)
 
if(
equali(ARGS,"/ags"))
{
admin_guns(id)
}
else if (
equali(ARGS,"/welcome"))
{
welcome_msg(id)
}
return 
PLUGIN_CONTINUE
}
 
public 
info(id)
{
new 
help_title[64], len
static msg[2047]
format(help_title,63,"%L",id,"HELP_HEADER")
len format(msg,2046,"<body bgcolor=#f5f5f5><font color=#000000><br>")
len += format(msg[len],2046-len,"<center><h2>%L</h2><br><table><tr><td><p><b><font color=#000000>",id,"HELP_TITLE")
len += format(msg[len],2046-len,"<h2>%L</h2>",id,"HELP_OBJECTIVE")
len += format(msg[len],2046-len,"%L<br>",id,"HELP_INFO")
}
 
public 
buy_menu(idkey
{
new 
money cs_get_user_money(id)
 
new 
dualcost 1000
new idfcost 2800
new akcost 3500
new m4a1cost 3500
 
 
switch (key
{
case 
0
{
if(
money dualcost)
{
client_print(idprint_center"%L",id"BUY_MONEY"dualcost)
}
else
{
 
cs_set_user_money(idmoney dualcost
give_item(id,"weapon_elite")
}
}
case 
1

if(
money idfcost)
{
client_print(idprint_center"%L",id"BUY_MONEY"idfcost)
}
else
{
 
cs_set_user_money(idmoney idfcost
give_item(id,"weapon_galil")
}
}
case 
2
{
if(
money akcost)
{
client_print(idprint_center"%L",id"BUY_MONEY"akcost)
}
else
{
 
cs_set_user_money(idmoney akcost
give_item(id,"weapon_ak47")
}
}
case 
3
{
if(
money m4a1cost)
{
client_print(idprint_center"%L",id"BUY_MONEY"m4a1cost)
}
else
{
 
cs_set_user_money(idmoney m4a1cost
give_item(id,"weapon_m4a1")
}
}
case 
9
 
return 
PLUGIN_HANDLED
}
}
public 
welcome_msg(id
{
client_print(0,print_chat,"%L",LANG_PLAYER,"W ELCOME_MSG"VERSION)
client_print(0,print_chat,"%L",LANG_PLAYER,"H ELP_MSG")
}
 
public 
admin_guns(id
{
if(!
is_user_alive(id))
return 
PLUGIN_HANDLED
 
if (get_user_flags(id) & ADMIN_KICK)
{
 
strip_user_weapons(id)
give_item(id,"weapon_deagle")
give_item(id,"weapon_hegrenade")
give_item(id,"weapon_knife")
}
return 
PLUGIN_HANDLED
}
public 
logevent_round_start(id
{
set_task (5.0 "welcomemsg")
set_task (5.0 "adminguns")
return 
PLUGIN_CONTINUE
}
public 
event_hud_reset(id
{
set_task(0.2,"event_player_spawn",id)
 
return 
PLUGIN_CONTINUE
}
public 
event_player_spawn(id

if(!
is_user_alive(id))
return 
PLUGIN_HANDLED
 
set_task
(random_float(0.1,0.5), "admin_guns"id)
 
return 
PLUGIN_CONTINUE


PLZ DO NOT STEAL OR COPY MY PLUGIN

One 04-08-2009 16:58

Re: plugin compiles but doesn't work.
 
no bo0dy will here steale any plugins... & use [php] or somthing else.. i stop to read ur code... post it in code.

dragonbolt 04-08-2009 18:37

Re: plugin compiles but doesn't work.
 
how di put it in code? :):cry::shock::)

fysiks 04-08-2009 19:00

Re: plugin compiles but doesn't work.
 
Put [php] before the code and [/php] after the code.

dragonbolt 04-10-2009 16:28

Re: plugin compiles but doesn't work.
 
ok done up at top.

DruGzOG 04-11-2009 10:24

Re: plugin compiles but doesn't work.
 
are all those 6 modules necessary?

dragonbolt 04-11-2009 15:55

Re: plugin compiles but doesn't work.
 
idk thats why i need help. rewriting


All times are GMT -4. The time now is 02:24.

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