1. rebdog1337

    rebdog1337 Naked Wanderer

    Has this method signature changed?
    I'm using it like this:


    void OnPlayerRespawned(ClientInfo info, string reason)
    {
    webrequest.EnqueuePost("webapi-address", info.playerId, (code, response) => PlayerDeathUpdateCallback(code, response), this);
    }

    Also is playerId always unique as im using like it is. (just for sanity sake)
     
  2. Wulf

    Wulf Community Admin Community Admin Oxide Developer

    Are you getting any errors in your oxide/logs? I don't think it has changed.
     
  3. rebdog1337

    rebdog1337 Naked Wanderer

    I did get an error
    08:00 [Error] Failed to call hook 'OnPlayerRespawned' on plugin 'Rebbot v0.1.0' (InvalidCastException: Cannot cast from source type to destination type.)

    Seems to be fine now, maybe it was a different error. I'll repost if i have issues. I guess could have been an api error or some other issue

    I'm trying to get the name of the weapon that was used to kill from the DamageResponse, do you know how to get that. I tried using DamageResponse.Source.GetName()

    Could it possibly be (EntityClass.list[DamageResponse.Source.getEntityId()]).entityClassName ?
     
  4. Wulf

    Wulf Community Admin Community Admin Oxide Developer

    Hmm, looks like the first argument is still EntityPlayer right now, not ClientInfo. It should be changed to ClientInfo though. The Docs probably got mass renamed and that hook got missed when the others were overhauled.