I'm trying to develop a local rank system for my servers based on style scores but I get an error when trying to retrieve the style property. I know it exists because I dumped the property list.
- Code: Select all
[SM] Native "GetEntProp" reported: Property "m_flStylePoints" not found (entity 2/player)
- Code: Select all
#include <sourcemod>
public Plugin:myinfo =
{
name = "DAB Australia: Ranks plugin",
version = "1.0",
};
public OnPluginStart()
{
HookEvent("player_disconnect", Event_PlayerDisconnect, EventHookMode_Pre);
PrintToServer("Rank system initialized.");
}
public Action:Event_PlayerDisconnect(Handle:event, const String:name[], bool:dontBroadcast)
{
new userid = GetEventInt(event, "userid")
new clientent = GetClientOfUserId(userid);
new clientScore = GetEntProp(clientent, Prop_Data, "m_flStylePoints");
PrintToChatAll("TESTINGPLUGINSPLEASEIGNORE: Score on disconnect: %s", clientScore);
return Plugin_Continue;
}
Excerpt from the network properties I dumped.
- Code: Select all
Member: m_flAimIn (offset 100) (type float) (bits 0) (NoScale)
Member: m_flSlowAimIn (offset 104) (type float) (bits 0) (NoScale)
Member: m_iStyleSkill (offset 232) (type integer) (bits 32) ()
Member: m_bSuperSkill (offset 236) (type integer) (bits 1) (Unsigned)
Member: m_iWallFlipCount (offset 124) (type integer) (bits 32) ()
Member: m_bIsWallFlipping (offset 128) (type integer) (bits 1) (Unsigned)
Member: m_flWallFlipEndTime (offset 132) (type float) (bits 0) (NoScale)