Sourcemod and DA

Double the Action. Double the Fun. Double Mint Gum.

Sourcemod and DA

Postby Reevezy » Thu Aug 21, 2014 12:44 am

I kind of doubt anyone can help me here what with the game just coming out and the almost zero custom server content. But just in case someone has tried I'll post this here, I've asked on the source mod forum as well, I expect if I get an answer it will be from them.

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)
Reevezy
 
Posts: 15
Joined: Tue Aug 19, 2014 12:09 am

Re: Sourcemod and DA

Postby Rai » Thu Aug 21, 2014 2:41 am

Could you dump the entire properties somewhere?
User avatar
Rai
 
Posts: 70
Joined: Sat Aug 02, 2014 7:57 am
Location: Netherlands

Re: Sourcemod and DA

Postby Reevezy » Thu Aug 21, 2014 2:50 am

Reevezy
 
Posts: 15
Joined: Tue Aug 19, 2014 12:09 am

Re: Sourcemod and DA

Postby Rai » Thu Aug 21, 2014 4:27 am

Just a gamble, because it always is between the two.
Try using Prop_Send instead of Prop_Data?
User avatar
Rai
 
Posts: 70
Joined: Sat Aug 02, 2014 7:57 am
Location: Netherlands

Re: Sourcemod and DA

Postby Reevezy » Thu Aug 21, 2014 4:49 am

Ah, I wasn't aware of Prop_Send, that's got it cheers.
Reevezy
 
Posts: 15
Joined: Tue Aug 19, 2014 12:09 am

Re: Sourcemod and DA

Postby Rai » Thu Aug 21, 2014 4:59 am

Sweet, glad it worked.
User avatar
Rai
 
Posts: 70
Joined: Sat Aug 02, 2014 7:57 am
Location: Netherlands

Re: Sourcemod and DA

Postby Vino » Thu Aug 21, 2014 12:37 pm

I don't know anything about source mod but don't forget that the Double Action source code is at http://github.com/bsvino/doubleaction
[ Tw | Fb | G+ ]
User avatar
Vino
We'll see
 
Posts: 3969
Joined: Wed May 02, 2007 7:25 pm
Location: Cary, NC

Re: Sourcemod and DA

Postby Reevezy » Thu Aug 21, 2014 8:23 pm

I had a look at the source, if I were to write a custom server build would regular clients throw a fit?
Reevezy
 
Posts: 15
Joined: Tue Aug 19, 2014 12:09 am

Re: Sourcemod and DA

Postby Vino » Fri Aug 22, 2014 11:43 am

There are certain things you can't change or yes clients will throw a fit. I would explain them but I'm out of time.

But if you do that and it's something a lot of server aimins would want you could send it as a pull request and I could integrate it into the game.
[ Tw | Fb | G+ ]
User avatar
Vino
We'll see
 
Posts: 3969
Joined: Wed May 02, 2007 7:25 pm
Location: Cary, NC


Return to Let's Play DA

Who is online

Users browsing this forum: No registered users and 2 guests

cron