Прошу помощи в настройке specmoney.smx Есть ли возможность настроить его таким образом, чтобы у игроков при прыжке в спектр и обратно наличные обнулялись, а не сохранялись?
// This file was auto-generated by SourceMod (v1.2.4) // ConVars for plugin "specmoney.smx"
// Sets the money value to set on the player who spec hops // Default = 0 // - // Default: "0" // Minimum: "0.000000" // Maximum: "16000.000000" sm_spechopmoneyvalue "1.000000"
Добавлено (30.06.2011, 12:30) --------------------------------------------- Вот еще specmoney.sp
/* Plugin Template generated by Pawn Studio */
#pragma semicolon 1
#include <sourcemod>
#define VERSION "1.0.0"
public Plugin:myinfo = { name = "Spec-Hop Money Block", author = "FlyingMongoose", description = "Prevents the gaining of money via spectator hopping.", version = VERSION, url = "http://www.interwavestudios.com/" }
new Handle:cvarSpecPunishment; new Handle:cvarSetMoneyValue;
new g_MoneyOffset;
new bool:FirstJoined[MAXPLAYERS+1];
new PlayersCash[MAXPLAYERS+1];
new bool:PlayerSpec[MAXPLAYERS+1];
new Handle:SpecTimer[MAXPLAYERS+1];
public OnPluginStart() { g_MoneyOffset = FindSendPropInfo("CCSPlayer", "m_iAccount"); if (g_MoneyOffset != -1) { CreateConVar("spec_hop_prevention_version",VERSION, _,FCVAR_PLUGIN|FCVAR_NOTIFY|FCVAR_REPLICATED|FCVAR_SPONLY); cvarSpecPunishment = CreateConVar("sm_spechoppunish","1","Sets punishment method for spectator hopping.\n0 = off\n1 = preserve money\n2 = set money",FCVAR_PLUGIN,true,0.0,true,2.0); cvarSetMoneyValue = CreateConVar("sm_spechopmoneyvalue","0","Sets the money value to set on the player who spec hops\nDefault = 0",FCVAR_PLUGIN,true,0.0,true,16000.0);
HookEvent("player_spawn",PlayerSpawn); HookEvent("player_death",PlayerDeath); HookEvent("player_team",TeamChanged); }else{ SetFailState("* FATAL ERROR: Failed to get offset for CCSPlayer::m_iAccount"); } }
public OnConfigsExecuted() { AutoExecConfig(true,"spechop"); }