MCPcopy Create free account
hub / github.com/alliedmodders/sourcemod / IsClientInVotePool

Function IsClientInVotePool

core/logic/smn_menus.cpp:1483–1500  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1481}
1482
1483static cell_t IsClientInVotePool(IPluginContext *pContext, const cell_t *params)
1484{
1485 int client;
1486 IGamePlayer *pPlayer;
1487
1488 client = params[1];
1489 if ((pPlayer = playerhelpers->GetGamePlayer(client)) == NULL)
1490 {
1491 return pContext->ThrowNativeError("Invalid client index %d", client);
1492 }
1493
1494 if (!menus->IsVoteInProgress())
1495 {
1496 return pContext->ThrowNativeError("No vote is in progress");
1497 }
1498
1499 return menus->IsClientInVotePool(client) ? 1 : 0;
1500}
1501
1502static cell_t RedrawClientVoteMenu(IPluginContext *pContext, const cell_t *params)
1503{

Callers 2

GetClientVoteChoiceMethod · 0.85
RedrawToClientMethod · 0.85

Calls 3

GetGamePlayerMethod · 0.80
IsVoteInProgressMethod · 0.45
IsClientInVotePoolMethod · 0.45

Tested by

no test coverage detected