|
Veteran Member
Join Date: Jan 2010
Location: mom's basement
|
06-22-2013
, 03:10
Re: [CSGO] warm up Verificartion
|
#2
|
dumping netprops, found these
Code:
CCSGameRulesProxy (type DT_CSGameRulesProxy)
Table: baseclass (offset 0) (type DT_GameRulesProxy)
Table: cs_gamerules_data (offset 0) (type DT_CSGameRules)
Member: m_bFreezePeriod (offset 560) (type integer) (bits 1)
Member: m_bWarmupPeriod (offset 561) (type integer) (bits 1)
Member: m_fWarmupPeriodEnd (offset 564) (type float) (bits 0)
Member: m_fWarmupPeriodStart (offset 568) (type float) (bits 0)
GameRules_GetProp
PHP Code:
if(GameRules_GetProp("m_bWarmupPeriod") == 1)
{
}
forget this!
maybe another way is check events
Try this
PHP Code:
new bool:bIsWarmup;
public OnPluginStart()
{
RegConsoleCmd("sm_test", test);
HookEventEx("round_announce_warmup", warmup);
HookEventEx("round_announce_match_start", warmup);
HookUserMessage(GetUserMessageId("TextMsg"), TextMsg);
}
public Action:test(client, args)
{
ReplyToCommand(client, "Warm Up = %s", bIsWarmup ? "TRUE":"FALSE");
return Plugin_Handled;
}
public warmup(Handle:event, const String:name[], bool:dontBroadcast)
{
bIsWarmup = StrEqual(name, "round_announce_warmup");
}
public Action:TextMsg(UserMsg:msg_id, Handle:pb, const players[], playersNum, bool:reliable, bool:init)
{
if(PbReadInt(pb, "msg_dst") == 3)
{
new String:buffer[40];
PbReadRepeatedString(pb, "params", 0, buffer, sizeof(buffer));
if(StrEqual(buffer, "#SFUI_Notice_Match_Will_Start_Chat", false))
{
//PrintToServer("%s", buffer);
bIsWarmup = true;
}
else if(StrEqual(buffer, "#SFUI_Notice_Warmup_Has_Ended", false))
{
//PrintToServer("%s", buffer);
bIsWarmup = false;
}
}
}
__________________
Do not Private Message @me
Last edited by Bacardi; 06-22-2013 at 06:18.
Reason: much better
|
|
|
|