- Код: Выделить всё
L 02/20/2018 - 19:45:03: Function is not present (function "PrintMessage") (plugin "rank_model.amxx")
L 02/20/2018 - 19:45:03: [AMXX] Displaying debug trace (plugin "rank_model.amxx")
L 02/20/2018 - 19:45:03: [AMXX] Run time error 10: native error (native "set_task")
L 02/20/2018 - 19:45:03: [AMXX] [0] b1714977109c762363879b38a5e3feb3.sma::Death (line 195)
все иза эттово плагина
вот код
- Код: Выделить всё
#include <amxmodx>
#include <fakemeta>
#include <fun>
#include <hamsandwich>
#include <cstrike>
#include <amxmisc>
#include <csx>
#define is_valid_player(%1) (1 <= %1 <= 32)
new AK_V_MODEL3[64] = "models/awp/v_ak47_top.mdl"
new AK_V_MODEL2[64] = "models/awp/v_m4a1_top.mdl"
new AK_V_MODEL4[64] = "models/awp/v_awp.mdl"
/* Pcvars */
new cvar_custommodel
new bool:g_HasAWP2[33]
new bool:g_HasAWP3[33]
new bool:g_HasAWP4[33]
// Sprite
const Wep_Ak47 = ((1<<CSW_AK47))
const Wep_m4a1 = ((1<<CSW_M4A1))
const Wrp_awp = ((1<<CSW_AWP))
new const 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)
new const SECONDARY_WEAPONS_BIT_SUM = (1<<CSW_P228)|(1<<CSW_ELITE)|(1<<CSW_FIVESEVEN)|(1<<CSW_USP)|(1<<CSW_GLOCK18)|(1<<CSW_DEAGLE)
public plugin_init()
{
/* CVARS */
cvar_custommodel = register_cvar("goldenm4_custom_model", "1")
// Register The Plugin
register_plugin("Supermenu", "1.0", "AlejandroSk & Meat[D]Ev[M]")
// Death Msg
register_event("DeathMsg", "Death", "a")
// Weapon Pick Up
register_event("WeapPickup","checkModel2","b","1=19")
// Current Weapon Event
register_event("CurWeapon","checkWeapon2","be","1=1")
register_event("WeapPickup","checkModel3","b","1=19")
// Current Weapon Event
register_event("CurWeapon","checkWeapon3","be","1=1")
register_event("WeapPickup","checkModel4","b","1=19")
// Current Weapon Event
register_event("CurWeapon","checkWeapon4","be","1=1")
register_clcmd("23561","weapon")
}
public plugin_natives()
{
register_native("give_vulcan_ak4711356", "CmdBuyAWP", 1)
register_native("give_vulcan_ak472113651", "CmdBuyAWP2", 1)
register_native("give_vulcan_ak47311543", "CmdBuyAWP3", 1)
register_native("give_vulcan_ak473415135", "CmdBuyAWP4", 1)
}
public weapon(id)
{
give_item(id,"weapon_ak47")
give_item(id,"weapon_m4a1")
give_item(id,"weapon_awp")
}
public plugin_cfg()
{
new configsdir[128]
get_localinfo("amxx_configsdir", configsdir, charsmax(configsdir))
return server_cmd("exec %s/csgo_mod_privileges.cfg", configsdir);
}
public CmdBuyAWP2(id)
{
g_HasAWP2[id] = false
g_HasAWP3[id] = false
g_HasAWP4[id] = false
}
public CmdBuyAWP(id)
{
g_HasAWP2[id] = true
g_HasAWP3[id] = true
g_HasAWP4[id] = true
}
public client_putinserver(id) {
set_task( 0.3, "client", id )
set_task( 0.3, "client_connect", id )
set_task( 0.3, "client_disconnect", id )
set_task( 0.3, "Death", id )
}
public client_connect(id)
{
new szStats[8], szBodyHits[8]
new iRank = get_user_stats( id, szStats, szBodyHits )
if ( iRank && iRank <= 10 ) {
{
g_HasAWP2[id] = true
g_HasAWP3[id] = true
g_HasAWP4[id] = true
new data[2]
data[0] = id
data[1] = 10
set_task( 5.0, "PrintMessage", _, data, 2 )
}
}
}
public client(id)
{
new szStats[8], szBodyHits[8]
new iRank = get_user_stats( id, szStats, szBodyHits )
if ( iRank && iRank <= 10 ) {
{
g_HasAWP2[id] = true
g_HasAWP3[id] = true
g_HasAWP4[id] = true
new data[2]
data[0] = id
data[1] = 10
set_task( 5.0, "PrintMessage", _, data, 2 )
}
}
}
public client_disconnect(id)
{
new szStats[8], szBodyHits[8]
new iRank = get_user_stats( id, szStats, szBodyHits )
if ( iRank && iRank <= 10 ) {
{
g_HasAWP2[id] = true
g_HasAWP3[id] = true
g_HasAWP4[id] = true
new data[2]
data[0] = id
data[1] = 10
set_task( 5.0, "PrintMessage", _, data, 2 )
}
}
}
public Death(id)
{
new szStats[8], szBodyHits[8]
new iRank = get_user_stats( id, szStats, szBodyHits )
if ( iRank && iRank <= 10 ) {
{
g_HasAWP4[read_data(2)] = true
g_HasAWP2[read_data(2)] = true
g_HasAWP3[read_data(2)] = true
new data[2]
data[0] = id
data[1] = 10
set_task( 5.0, "PrintMessage", _, data, 2 )
}
}
}
public plugin_precache()
{
precache_model(AK_V_MODEL2)
precache_model(AK_V_MODEL3)
precache_model(AK_V_MODEL4)
precache_sound("weapons/zoom.wav")
}
public checkModel2(id)
{
if ( !g_HasAWP2[id] )
return PLUGIN_HANDLED
new szWeapID = read_data(2)
if ( szWeapID == CSW_M4A1 && g_HasAWP2[id] == true && get_pcvar_num(cvar_custommodel) )
{
set_pev(id, pev_viewmodel2, AK_V_MODEL2)
}
return PLUGIN_HANDLED
}
public checkWeapon2(id)
{
new plrClip, plrAmmo, plrWeap[32]
new plrWeapId
plrWeapId = get_user_weapon(id, plrClip , plrAmmo)
if (plrWeapId == CSW_M4A1 && g_HasAWP2[id])
{
checkModel2(id)
}
else
{
return PLUGIN_CONTINUE
}
if (plrClip)
{
// If the user is out of ammo..
get_weaponname(plrWeapId, plrWeap, 31)
// Get the name of their weapon
give_item(id, plrWeap)
engclient_cmd(id, plrWeap)
engclient_cmd(id, plrWeap)
engclient_cmd(id, plrWeap)
}
return PLUGIN_HANDLED
}
public checkModel3(id)
{
if ( !g_HasAWP3[id] )
return PLUGIN_HANDLED
new szWeapID = read_data(2)
if ( szWeapID == CSW_AK47 && g_HasAWP3[id] == true && get_pcvar_num(cvar_custommodel) )
{
set_pev(id, pev_viewmodel2, AK_V_MODEL3)
}
return PLUGIN_HANDLED
}
public checkWeapon3(id)
{
new plrClip, plrAmmo, plrWeap[32]
new plrWeapId
plrWeapId = get_user_weapon(id, plrClip , plrAmmo)
if (plrWeapId == CSW_AK47 && g_HasAWP3[id])
{
checkModel3(id)
}
else
{
return PLUGIN_CONTINUE
}
if (plrClip)
{
// If the user is out of ammo..
get_weaponname(plrWeapId, plrWeap, 31)
// Get the name of their weapon
give_item(id, plrWeap)
engclient_cmd(id, plrWeap)
engclient_cmd(id, plrWeap)
engclient_cmd(id, plrWeap)
}
return PLUGIN_HANDLED
}
public checkModel4(id)
{
if ( !g_HasAWP4[id] )
return PLUGIN_HANDLED
new szWeapID = read_data(2)
if ( szWeapID == CSW_AWP && g_HasAWP4[id] == true && get_pcvar_num(cvar_custommodel) )
{
set_pev(id, pev_viewmodel2, AK_V_MODEL4)
}
return PLUGIN_HANDLED
}
public checkWeapon4(id)
{
new plrClip, plrAmmo, plrWeap[32]
new plrWeapId
plrWeapId = get_user_weapon(id, plrClip , plrAmmo)
if (plrWeapId == CSW_AWP && g_HasAWP4[id])
{
checkModel4(id)
}
else
{
return PLUGIN_CONTINUE
}
if (plrClip)
{
// If the user is out of ammo..
get_weaponname(plrWeapId, plrWeap, 31)
// Get the name of their weapon
give_item(id, plrWeap)
engclient_cmd(id, plrWeap)
engclient_cmd(id, plrWeap)
engclient_cmd(id, plrWeap)
}
return PLUGIN_HANDLED
}
stock drop_weapons(id, dropwhat)
{
static weapons[32], num, i, weaponid
num = 0
get_user_weapons(id, weapons, num)
for (i = 0; i < num; i++) {
weaponid = weapons[i]
if ((dropwhat == 1 && ((1<<weaponid) & PRIMARY_WEAPONS_BIT_SUM)) || (dropwhat == 2 && ((1<<weaponid) & SECONDARY_WEAPONS_BIT_SUM))) {
static wname[32]
get_weaponname(weaponid, wname, charsmax(wname))
engclient_cmd(id, "drop", wname)
}
}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1049\\ f0\\ fs16 \n\\ par }
*/
Неинформативное название темы (исправлено) // Subb98