Add new class natives
Adding ZR_GetHumanClass & ZR_GetZombieClass natives to expose external plugins to more than just the clients current active class.
This commit is contained in:
parent
96d5670b18
commit
0edae8772e
|
@ -35,6 +35,8 @@ APIClassInit()
|
||||||
// Natives
|
// Natives
|
||||||
CreateNative("ZR_IsValidClassIndex", APIIsValidClassIndex);
|
CreateNative("ZR_IsValidClassIndex", APIIsValidClassIndex);
|
||||||
CreateNative("ZR_GetActiveClass", APIGetActiveClass);
|
CreateNative("ZR_GetActiveClass", APIGetActiveClass);
|
||||||
|
CreateNative("ZR_GetHumanClass", APIGetHumanClass);
|
||||||
|
CreateNative("ZR_GetZombieClass", APIGetZombieClass);
|
||||||
CreateNative("ZR_SelectClientClass", APISelectClientClass);
|
CreateNative("ZR_SelectClientClass", APISelectClientClass);
|
||||||
CreateNative("ZR_GetClassByName", APIGetClassByName);
|
CreateNative("ZR_GetClassByName", APIGetClassByName);
|
||||||
CreateNative("ZR_GetClassDisplayName", APIGetClassDisplayName);
|
CreateNative("ZR_GetClassDisplayName", APIGetClassDisplayName);
|
||||||
|
@ -67,6 +69,36 @@ public APIGetActiveClass(Handle:plugin, numParams)
|
||||||
return ClassGetActiveIndex(client);
|
return ClassGetActiveIndex(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Native call function (ZR_GetHumanClass)
|
||||||
|
*
|
||||||
|
* native bool:ZR_GetHumanClass(client);
|
||||||
|
*/
|
||||||
|
public APIGetHumanClass(Handle:plugin, numParams)
|
||||||
|
{
|
||||||
|
new client = GetNativeCell(1);
|
||||||
|
|
||||||
|
// Validate the client index. Player must be alive.
|
||||||
|
APIValidateClientIndex(client, Condition_True);
|
||||||
|
|
||||||
|
return ClassGetHumanIndex(client);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Native call function (ZR_GetZombieClass)
|
||||||
|
*
|
||||||
|
* native bool:ZR_GetZombieClass(client);
|
||||||
|
*/
|
||||||
|
public APIGetZombieClass(Handle:plugin, numParams)
|
||||||
|
{
|
||||||
|
new client = GetNativeCell(1);
|
||||||
|
|
||||||
|
// Validate the client index. Player must be alive.
|
||||||
|
APIValidateClientIndex(client, Condition_True);
|
||||||
|
|
||||||
|
return ClassGetZombieIndex(client);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Native call function (ZR_SelectClientClass)
|
* Native call function (ZR_SelectClientClass)
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue
Block a user