forward for the clients steamID, mapchoice and vote weight
This commit is contained in:
parent
cb8d244030
commit
d697faa470
@ -78,6 +78,11 @@ forward void OnMapVoteStart();
|
|||||||
*/
|
*/
|
||||||
forward void OnMapVoteEnd(const char[] map);
|
forward void OnMapVoteEnd(const char[] map);
|
||||||
|
|
||||||
|
/**
|
||||||
|
just send the steamID, vote choice and voteweight of the client as a forward
|
||||||
|
**/
|
||||||
|
|
||||||
|
forward void OnMapVoteClientResult(char[] steamID, char[] vote_choice, int voteweight);
|
||||||
/**
|
/**
|
||||||
* Is a map on the current game's official list?
|
* Is a map on the current game's official list?
|
||||||
* This should be treated as informative only.
|
* This should be treated as informative only.
|
||||||
@ -85,6 +90,7 @@ forward void OnMapVoteEnd(const char[] map);
|
|||||||
* @param map Name of map to check
|
* @param map Name of map to check
|
||||||
* @return true if it's on the list of official maps for this game
|
* @return true if it's on the list of official maps for this game
|
||||||
*/
|
*/
|
||||||
|
|
||||||
native bool IsMapOfficial(const char[] map);
|
native bool IsMapOfficial(const char[] map);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -181,6 +181,7 @@ Handle g_MapVoteWarningStartForward = INVALID_HANDLE;
|
|||||||
Handle g_MapVoteWarningTickForward = INVALID_HANDLE;
|
Handle g_MapVoteWarningTickForward = INVALID_HANDLE;
|
||||||
Handle g_MapVoteStartForward = INVALID_HANDLE;
|
Handle g_MapVoteStartForward = INVALID_HANDLE;
|
||||||
Handle g_MapVoteEndForward = INVALID_HANDLE;
|
Handle g_MapVoteEndForward = INVALID_HANDLE;
|
||||||
|
Handle g_MapVoteClientResultFroward = INVALID_HANDLE;
|
||||||
Handle g_MapVoteRunoffStartForward = INVALID_HANDLE;
|
Handle g_MapVoteRunoffStartForward = INVALID_HANDLE;
|
||||||
|
|
||||||
/* Mapchooser Extended Globals */
|
/* Mapchooser Extended Globals */
|
||||||
@ -418,6 +419,7 @@ public void OnPluginStart()
|
|||||||
//MapChooser Extended Forwards
|
//MapChooser Extended Forwards
|
||||||
g_MapVoteStartForward = CreateGlobalForward("OnMapVoteStart", ET_Ignore); // Deprecated
|
g_MapVoteStartForward = CreateGlobalForward("OnMapVoteStart", ET_Ignore); // Deprecated
|
||||||
g_MapVoteEndForward = CreateGlobalForward("OnMapVoteEnd", ET_Ignore, Param_String);
|
g_MapVoteEndForward = CreateGlobalForward("OnMapVoteEnd", ET_Ignore, Param_String);
|
||||||
|
g_MapVoteClientResultFroward = CreateGlobalForward("OnMapVoteClientResult", ET_Ignore, Param_String, Param_String, Param_Cell);
|
||||||
g_MapVoteWarningStartForward = CreateGlobalForward("OnMapVoteWarningStart", ET_Ignore);
|
g_MapVoteWarningStartForward = CreateGlobalForward("OnMapVoteWarningStart", ET_Ignore);
|
||||||
g_MapVoteWarningTickForward = CreateGlobalForward("OnMapVoteWarningTick", ET_Ignore, Param_Cell);
|
g_MapVoteWarningTickForward = CreateGlobalForward("OnMapVoteWarningTick", ET_Ignore, Param_Cell);
|
||||||
g_MapVoteRunoffStartForward = CreateGlobalForward("OnMapVoteRunnoffWarningStart", ET_Ignore);
|
g_MapVoteRunoffStartForward = CreateGlobalForward("OnMapVoteRunnoffWarningStart", ET_Ignore);
|
||||||
@ -1769,6 +1771,16 @@ public void Handler_MapVoteFinished(Handle menu,
|
|||||||
sm.GetValue(map, value);
|
sm.GetValue(map, value);
|
||||||
value += GetPlayerWorthRTV_boost_(client);
|
value += GetPlayerWorthRTV_boost_(client);
|
||||||
sm.SetValue(map, value, true);
|
sm.SetValue(map, value, true);
|
||||||
|
|
||||||
|
char sSID[64];
|
||||||
|
GetClientAuthId(client, AuthId_Steam2, sSID, sizeof(sSID));
|
||||||
|
|
||||||
|
//setting the players steamID, vote choice and vote weight here for playtime display
|
||||||
|
Call_StartForward(g_MapVoteClientResultFroward);
|
||||||
|
Call_PushString(sSID);
|
||||||
|
Call_PushString(map);
|
||||||
|
Call_PushCell(GetPlayerWorthRTV_boost_(client));
|
||||||
|
Call_Finish();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user