Quote:
Originally Posted by eyal282
Why not be extra safe and do this?
Code:
public APLRes AskPluginLoad2(Handle hSelf, bool bLate, char[] szError, int iErrMax)
{
CreateNative("IsClientBuried", Native_IsBuried);
RegPluginLibrary("max_natives");
return APLRes_Success;
}
public Native_IsBuried(Handle hPlugin, int iNumparams)
{
int iID = GetNativeCell(1);
return bool:g_bIsBurried[iID];
}
//from max_natives.inc
native bool IsClientBuried(int iID);
Here's how the L4D2 point system is doing:
Code:
CreateNative("PS_SetPoints", PS_SetPoints);
public PS_SetPoints(Handle:plugin, numParams)
{
new client = GetNativeCell(1);
new newval = GetNativeCell(2);
points[client] = newval;
}
The CreateNative appears in APL obviously.
|
Strange, but biew as bool seemed to fix it. Thanks !
Code:
public int Native_IsBuried(Handle hPlugin, int iNumparams)
{
int iID = GetNativeCell(1);
return view_as<bool>(g_bIsBurried[iID]);
}