Raised This Month: $ Target: $400
 0% 

[Orpheu] Team Question


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-07-2011 , 05:54   Re: [Orpheu] Team Question
Reply With Quote #5

According to vtable, it is 55 and 57.
Code:
RefreshSkillData__18CHalfLifeMultiplay
Think__18CHalfLifeMultiplay
IsAllowedToSpawn__18CHalfLifeMultiplayP11CBaseEntity ; CGameRules::CanHaveAmmo(CBasePlayer *,char const *,int)
FAllowFlashlight__18CHalfLifeMultiplay
FShouldSwitchWeapon__18CHalfLifeMultiplayP11CBasePlayerP15CBasePlayerItem
GetNextBestWeapon__18CHalfLifeMultiplayP11CBasePlayerP15CBasePlayerItem
IsMultiplayer__18CHalfLifeMultiplay
IsDeathmatch__18CHalfLifeMultiplay
IsTeamplay__10CGameRules
IsCoOp__18CHalfLifeMultiplay
GetGameDescription__10CGameRules
ClientConnected__18CHalfLifeMultiplayP7edict_sPCcT2Pc
InitHUD__18CHalfLifeMultiplayP11CBasePlayer
ClientDisconnected__18CHalfLifeMultiplayP7edict_s
UpdateGameMode__18CHalfLifeMultiplayP11CBasePlayer
FlPlayerFallDamage__18CHalfLifeMultiplayP11CBasePlayer
FPlayerCanTakeDamage__18CHalfLifeMultiplayP11CBasePlayerP11CBaseEntity
ShouldAutoAim__10CGameRulesP11CBasePlayerP7edict_s
PlayerSpawn__18CHalfLifeMultiplayP11CBasePlayer
PlayerThink__18CHalfLifeMultiplayP11CBasePlayer
FPlayerCanRespawn__18CHalfLifeMultiplayP11CBasePlayer
FlPlayerSpawnTime__18CHalfLifeMultiplayP11CBasePlayer
GetPlayerSpawnSpot__18CHalfLifeMultiplayP11CBasePlayer
AllowAutoTargetCrosshair__18CHalfLifeMultiplay
ClientCommand_DeadOrAlive__18CHalfLifeMultiplayP11CBasePlayerPCc
ClientCommand__18CHalfLifeMultiplayP11CBasePlayerPCc
ClientUserInfoChanged__18CHalfLifeMultiplayP11CBasePlayerPc
IPointsForKill__18CHalfLifeMultiplayP11CBasePlayerT1
PlayerKilled__18CHalfLifeMultiplayP11CBasePlayerP9entvars_sT2
DeathNotice__18CHalfLifeMultiplayP11CBasePlayerP9entvars_sT2
CanHavePlayerItem__18CHalfLifeMultiplayP11CBasePlayerP15CBasePlayerItem
PlayerGotWeapon__18CHalfLifeMultiplayP11CBasePlayerP15CBasePlayerItem
WeaponShouldRespawn__18CHalfLifeMultiplayP15CBasePlayerItem
FlWeaponRespawnTime__18CHalfLifeMultiplayP15CBasePlayerItem
FlWeaponTryRespawn__18CHalfLifeMultiplayP15CBasePlayerItem
VecWeaponRespawnSpot__18CHalfLifeMultiplayP15CBasePlayerItem
CanHaveItem__18CHalfLifeMultiplayP11CBasePlayerP5CItem
PlayerGotItem__18CHalfLifeMultiplayP11CBasePlayerP5CItem
ItemShouldRespawn__18CHalfLifeMultiplayP5CItem
FlItemRespawnTime__18CHalfLifeMultiplayP5CItem
VecItemRespawnSpot__18CHalfLifeMultiplayP5CItem
CanHaveAmmo__10CGameRulesP11CBasePlayerPCci
PlayerGotAmmo__18CHalfLifeMultiplayP11CBasePlayerPci
AmmoShouldRespawn__18CHalfLifeMultiplayP15CBasePlayerAmmo
FlAmmoRespawnTime__18CHalfLifeMultiplayP15CBasePlayerAmmo
VecAmmoRespawnSpot__18CHalfLifeMultiplayP15CBasePlayerAmmo
FlHealthChargerRechargeTime__18CHalfLifeMultiplay
FlHEVChargerRechargeTime__18CHalfLifeMultiplay
DeadPlayerWeapons__18CHalfLifeMultiplayP11CBasePlayer
DeadPlayerAmmo__18CHalfLifeMultiplayP11CBasePlayer
GetTeamID__18CHalfLifeMultiplayP11CBaseEntity
PlayerRelationship__18CHalfLifeMultiplayP11CBasePlayerP11CBaseEntity
GetTeamIndex__10CGameRulesPCc
GetIndexedTeamName__10CGameRulesi
IsValidTeam__10CGameRulesPCc
ChangePlayerTeam__10CGameRulesP11CBasePlayerPCcii
SetDefaultPlayerTeam__10CGameRulesP11CBasePlayer
PlayTextureSounds__18CHalfLifeMultiplay
FAllowMonsters__18CHalfLifeMultiplay
EndMultiplayerGame__18CHalfLifeMultiplay
IsFreezePeriod__10CGameRules
ServerDeactivate__18CHalfLifeMultiplay
CheckMapConditions__18CHalfLifeMultiplay
CleanUpMap__18CHalfLifeMultiplay
RestartRound__18CHalfLifeMultiplay
CheckWinConditions__18CHalfLifeMultiplay
RemoveGuns__18CHalfLifeMultiplay
GiveC4__18CHalfLifeMultiplay
ChangeLevel__18CHalfLifeMultiplay
GoToIntermission__18CHalfLifeMultiplay
Also your args are wrong, the only arg is CBasePlayer *

Hook and call would look :
PHP Code:
new g_pGameRules
new OrpheuFunction:g_oFnChangePlayerTeam

public plugin_precache()
{
    
OrpheuRegisterHook(OrpheuGetFunction("InstallGameRules"), "OnInstallGameRules_Post"OrpheuHookPost)
}

public 
OnInstallGameRules_Post()
{
    
g_pGameRules OrpheuGetReturn()
    
g_oFnChangePlayerTeam OrpheuGetFunctionFromObject(g_pGameRules"ChangePlayerTeam""CGameRules")
    
OrpheuRegisterHook(g_oFnChangePlayerTeam"OnChangePlayerTeam"OrpheuHookPre)
}

public 
OnChangePlayerTeam(pGameRulesid)
{
}

ChangePlayerTeamid )
{
    
OrpheuCall(g_pGameRulesid)

functions/InstallGameRules
Code:
{
    "name" : "InstallGameRules",
    "library" : "mod",
    "return" : 
    {
        "type" : "CHalfLifeMultiplay *"
    },
    "identifiers":
    [
        {
            "os" : "windows",
            "mod" : "cstrike",
            "value" : [0x68,"*","*","*","*",0xFF,0x15,"*","*","*","*",0x83,"*","*",0xFF,0x15,"*","*","*","*",0xA1,"*","*","*","*",0xD9]
        },
		{
            "os" : "linux",
            "mod" : "cstrike",
            "value" : "InstallGameRules__Fv"
        }
    ]
}
Code:
{
    "name" : "ChangePlayerTeam",
    "class" : "CGameRules",
    "library" : "mod",
    "arguments" :
    [
        {
            "type" : "CBasePlayer *",
            "info" : "PlayerIndex"
        }
    ],
    "indexes" :
    [
        {
            "os" : "windows",
            "mod" : "cstrike",
            "value" : 55
        },
        {
            "os" : "linux",
            "mod" : "cstrike",
            "value" : 57
        }
    ]
}

Also, please notice that your args were wrong, if there is more than 1 arg, you have to open new bracket "{" for each arg.
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 05-07-2011 at 06:03.
ConnorMcLeod is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:29.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode