Raised This Month: $32 Target: $400
 8% 

[INC] Sven Co-op 4.5 (v2) [10-01-11]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
schmurgel1983
Veteran Member
Join Date: Aug 2006
Location: Germany
Old 09-29-2011 , 08:44   [INC] Sven Co-op 4.5 (v2) [10-01-11]
Reply With Quote #1

Stocks for Sven Co-op 4.5

Requirements:
Mods: Sven Co-op 4.5
AMXX: Version 1.8.0 or later
Module: fakemeta, hamsandwich


PHP Code:
/**
 * Returns a monster's ally state.
 *
 * @param  entity    Entity index.
 * @return            True if it is, false otherwise.
 */
sc_get_monster_ally(entity)

/**
 * Returns a player's health.
 *
 * @param client    Player index. [1 to 32]
 * @return            Health amount.
 */
sc_get_user_health(client)

/**
 * Sets a player's health.
 *
 * @param client    Player index. [1 to 32]
 * @param health    New health amount.
 * @return            True if it is, false otherwise.
 */
sc_set_user_health(clienthealth)

/**
 * Returns a player's flashlight battery charge.
 *
 * @param client    Player index. [1 to 32]
 * @return            Charge percent. [0 to 100]
 */
sc_get_user_flashbat(client)

/**
 * Sets a player's flashlight battery charge.
 *
 * @param client    Player index. [1 to 32]
 * @param value        New charge percent. [0 to 100]
 * @return            True if it is, false otherwise.
 */
sc_set_user_flashbat(clientvalue)

/**
 * Returns player's H.E.V. Suit battery.
 *
 * @param client    Player index. [1 to 32]
 * @return            Battery amount. [0 to 999]
 */
sc_get_user_battery(client)

/**
 * Sets player's H.E.V. Suit battery.
 *
 * @param client    Player index. [1 to 32]
 * @param value        New battery amount. [0 to 999]
 * @return            True if it is, false otherwise.
 */
sc_set_user_battery(clientvalue)

/**
 * Returns player's frags.
 *
 * @param client    Player index. [1 to 32]
 * @return            Number of frags.
 */
sc_get_user_frags(client)

/**
 * Returns player's deaths.
 *
 * @param client    Player index. [1 to 32]
 * @return            Number of deaths.
 */
sc_get_user_deaths(client)

/**
 * Sets a player's scores.
 *
 * @param client    Player index. [1 to 32]
 * @param frags        Number of frags.
 * @param deaths    Number of deaths.
 * @return            True if it is, false otherwise.
 */
sc_set_user_score(clientfragsdeaths)

/**
 * Returns player's current weapon entity.
 *
 * @param client    Player index. [1 to 32]
 * @return            Entity index.
 */
sc_get_cur_weapon_entity(client)

/**
 * Returns owner from entity.
 *
 * @param entity    Entity index.
 * @return            Player index. [1 to 32]
 */
sc_get_weapon_owner(entity)

/**
 * Returns weapon id from entity.
 *
 * @param entity    Entity index.
 * @return            Weapon id. [SCW_CROWBAR to SCW_SHOCKRIFLE]
 */
sc_get_weapon_id(entity)

/**
 * Returns weapon clip ammo.
 *
 * @param entity    Entity index.
 * @return            Clip ammo amount. [-1 invalid weapon]
 */
sc_get_weapon_ammo(entity)

/**
 * Sets a weapon clip ammo.
 *
 * @param entity    Entity index.
 * @param clip        New clip ammo value. [0 to 999]
 * @return            True if it is, false otherwise.
 */
sc_set_weapon_ammo(entityclip)

/**
 * Returns UZI Akimbo second clip ammo.
 *
 * @param entity    Entity index.
 * @return            Clip ammo amount. [0 to 999]
 */
sc_get_weapon_ammo2(entity)

/**
 * Sets a UZI Akimbo second clip ammo.
 *
 * @param entity    Entity index.
 * @param clip        New clip ammo value. [0 to 999]
 * @return            True if it is, false otherwise.
 */
sc_set_weapon_ammo2(entityclip)

/**
 * Returns player's backpack ammo.
 *
 * @param client    Player index. [1 to 32]
 * @param weapon    Weapon id. [SCW_CROWBAR to SCW_SHOCKRIFLE]
 * @return            Backpack ammo amount. [0 to 999] [-1 invalid bpammo]
 */
sc_get_user_bpammo(clientweapon)

/**
 * Sets a player's backpack ammo.
 *
 * @param client    Player index. [1 to 32]
 * @param weapon    Weapon id. [SCW_CROWBAR to SCW_SHOCKRIFLE]
 * @param ammo        Backpack ammo value. [0 to 999]
 * @return            True if it is, false otherwise.
 */
sc_set_user_bpammo(clientweaponammo)

/**
 * Returns player's m16 grenade ammo.
 *
 * @param client    Player index. [1 to 32]
 * @return            Backpack ammo amount. [0 to 99]
 */
sc_get_user_bpammo2(client)

/**
 * Sets a player's m16 grenade ammo.
 *
 * @param client    Player index. [1 to 32]
 * @param ammo        Backpack ammo value. [0 to 99]
 * @return            True if it is, false otherwise.
 */
sc_set_user_bpammo2(clientammo)

/**
 * Strip all weapons from player.
 *
 * @param client    Player index. [1 to 32]
 * @return            True if it is, false otherwise.
 */
sc_strip_user_weapons(client)

/**
 * Spawn a player.
 *
 * @param client    Player index. [1 to 32]
 * @return            True if it is, false otherwise.
 */
sc_user_spawn(client)

/**
 * Returns player's have Long Jump.
 *
 * @param client    Player index. [1 to 32]
 * @return            True if it is, false otherwise.
 */
sc_get_user_longjump(client)

/**
 * Sets a player's Long Jump.
 *
 * @param client    Player index. [1 to 32]
 * @param longjump    Enable/Disable longjump. [0 to 1]
 * @param icon        Show pickup icon. [0 to 1]
 * @return            True if it is, false otherwise.
 */
sc_set_user_longjump(clientlongjumpicon
Attached Files
File Type: inc fm_svencoop.inc (10.9 KB, 482 views)
File Type: inc fm_svencoop_const.inc (2.9 KB, 461 views)
__________________

Working on:
nothing

Last edited by schmurgel1983; 10-01-2011 at 15:34. Reason: version 2
schmurgel1983 is offline
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 09-29-2011 , 18:32   Re: [INC] Sven Co-op 4.5 (v1) [09-29-11]
Reply With Quote #2

I'm not familiar but Sven Co-op, but it seems like these stocks would be very useful to those who are.

Good job.
__________________
Quote:
Originally Posted by DarkGod View Post
nikhilgupta generates his plugins using sheer awesome.
If you like my work, please
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 10-01-2011 , 11:35   Re: [INC] Sven Co-op 4.5 (v1) [09-29-11]
Reply With Quote #3

get_user_health and set_user_health should be enough i think.
about sc_set_flashlight_battery, i think that the game is gonna send the message so you shouldn't need to send it (same could aply for sc_set_hev_suit_battery )

For sc_set_user_score, have you tried instead of sending the message to send Ham_AddPoint(id, 0 ?, it works fine in cs.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
schmurgel1983
Veteran Member
Join Date: Aug 2006
Location: Germany
Old 10-01-2011 , 12:42   Re: [INC] Sven Co-op 4.5 (v1) [09-29-11]
Reply With Quote #4

Quote:
Originally Posted by ConnorMcLeod View Post
get_user_health and set_user_health should be enough i think.
Enough for what?
Quote:
Originally Posted by ConnorMcLeod View Post
about sc_set_flashlight_battery, i think that the game is gonna send the message so you shouldn't need to send it (same could aply for sc_set_hev_suit_battery )
if u set flashbat but not sending message, dosen't update hud, if u don't using flashlight. hevbat update instantly, removing message from stock next version. thx
Quote:
Originally Posted by ConnorMcLeod View Post
For sc_set_user_score, have you tried instead of sending the message to send Ham_AddPoint(id, 0 ?, it works fine in cs.
hamdata.ini from 1.8.1 base zip.
Code:
@section SvenCoop windows
    pev 4
    base 0x0
    
    spawn 0
    precache 1
    keyvalue 2
    objectcaps 5
    takedamage 11 // sc45 is 13
    addpoints 20 // not found yet
    addpointstoteam 21 // not found yet
    addplayeritem 22 // sc45 is 24
    removeplayeritem 23 // sc45 is 25
    giveammo 24 // not found yet
    oncontrols 32 // not found yet
    isalive 34 // sc45 is 35
    isbspmodel 35 // sc45 is 36
    reflectgauss 36 // not found yet
    hastarget 37 // not found yet
    isinworld 38 // not found yet
    isplayer 39 // sc45 is 42
    isnetclient 40 // sc45 is 44
    teamid 42 // not found yet
    getnexttarget 43 // not found yet
    think 44 // sc45 is 49
    touch 45 // sc45 is 50
    use 46 // sc45 is 51
    blocked 47 // not found yet
    respawn 48 // not found yet
    center 51 // not found yet
    eyeposition 52 // not found yet
    earposition 53 // not found yet
    bodytarget 54 // not found yet
    illumination 55 // not found yet
    fvisible 56 // not found yet
@end
my post on Hamsandwich Updating topic with the new offsets for ham, here.
if u want to help me, u welcome.
__________________

Working on:
nothing

Last edited by schmurgel1983; 10-01-2011 at 12:55.
schmurgel1983 is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 10-02-2011 , 05:37   Re: [INC] Sven Co-op 4.5 (v1) [09-29-11]
Reply With Quote #5

Quote:
Originally Posted by schmurgel1983 View Post
Enough for what?
Enough to not add a native conversion that has no utility, IMO.
(Unless, for set_user_health, if fun module doesn't work on this mod).


Quote:
Originally Posted by schmurgel1983 View Post
my post on Hamsandwich Updating topic with the new offsets for ham, here.
if u want to help me, u welcome.
I didn't knew it wasn't found yet ;)
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
yokomo
Surprise Ascot!
Join Date: May 2010
Location: Malaysia
Old 12-11-2012 , 14:16   Re: [INC] Sven Co-op 4.5 (v2) [10-01-11]
Reply With Quote #6

Tested this stock on current SvenCoop 4.6 with metamod-p and amxmodx 1.8.2hg26, but it no longer working. Hope someone will update this stocks.
__________________
Team-MMG CS1.6 Servers:
✅ MultiMod -- 103.179.44.152:27016
✅ Zombie Plague -- 103.179.44.152:27015
✅ Zombie Escape -- 103.179.44.152:27017
✅ Klassik Kombat -- 103.179.44.152:27018
✅ Boss-Battle -- 103.179.44.152:27019
yokomo is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-12-2012 , 02:35   Re: [INC] Sven Co-op 4.5 (v2) [10-01-11]
Reply With Quote #7

Try with those value :

Code:
// old file values are commented

const OFFSET_PLAYER_FLASHBAT = 8525 // m_iFlashBattery
const OFFSET_PLAYER_LONGJUMP = 8642 // 8641 // m_fLongJump
const OFFSET_PLAYER_BATTERY = 8646 // 8645 // m_iClientBattery
const OFFSET_PLAYER_FRAGS = 8651 // 8650 // that one has not been checked, and seems svencoop specific
const OFFSET_PLAYER_ACTIVE_ITEM = 8659 // 8658 // m_pActiveItem
const OFFSET_PLAYER_DEATHS = 8730 // 8729 // m_iDeaths
Actually while i was searching for those offsets, i've found those ones :
Code:
stock const m_iPlayerSound = 8437;

stock const m_flFlashLightTime = 8524;
stock const m_iFlashBattery = 8525;

stock const m_afButtonLast = 8526;
stock const m_afButtonPressed = 8527;
stock const m_afButtonReleased = 8528;

stock const m_afPhysicsFlags = 8541;

stock const m_tSneaking = 8643;
stock const m_iUpdateTime = 8644;
stock const m_iClientHealth = 8645;
stock const m_iClientBattery = 8646;
stock const m_iHideHUD = 8647;
stock const m_iHideHUD = 8647;
stock const m_iClientHideHUD = 8648;
stock const m_iFOV = 8649;
stock const m_iClientFOV = 8650;
stock const m_iClientFrags = 8651; // ???? svencoop specific offset ???
stock const m_rgpPlayerItems[6] = {8652,8653,...}; // MAX_ITEM_TYPES 6
// what is there 8660
stock const m_pActiveItem = 8659;
stock const m_pClientActiveItem = 8660;
stock const m_pLastItem = 8661;
stock const m_rgAmmo[32] = {8662,8663,...}; // -> 8669 // MAX_AMMO_SLOTS 32
stock const m_rgAmmoLast[32] = {8694,8695,...};

stock const m_vecAutoAim[3] = {8726,8727,8728};
stock const m_fOnTarget = 8729;
stock const m_iDeaths = 8730;
stock const m_iRespawnFrames = 8731;

stock const m_lastx = 8732;
stock const m_lasty = 8733;

stock const m_nCustomSprayFrames = 8734;
stock const m_flNextDecalTime = 8735;
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 12-12-2012 at 12:24.
ConnorMcLeod is offline
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 12-12-2012 , 12:05   Re: [INC] Sven Co-op 4.5 (v2) [10-01-11]
Reply With Quote #8

This is wrong but the offset exists, it's used for other thing (like frags?)
Quote:
stock const m_iHealth = 8651; // ???? svencoop specific offset ???
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.

Last edited by joropito; 12-12-2012 at 12:05.
joropito is offline
Send a message via MSN to joropito
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-12-2012 , 12:25   Re: [INC] Sven Co-op 4.5 (v2) [10-01-11]
Reply With Quote #9

m_iClientFrags

Copy of pev->frags, update score sending a ScoreInfo message in UpdateClientDate when pev->frags differs from m_iClientFrags, such a thing SHOULD exist in counter strike.....
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
yokomo
Surprise Ascot!
Join Date: May 2010
Location: Malaysia
Old 12-12-2012 , 14:09   Re: [INC] Sven Co-op 4.5 (v2) [10-01-11]
Reply With Quote #10

Quote:
Originally Posted by ConnorMcLeod View Post
Try with those value :

Code:
// old file values are commented

const OFFSET_PLAYER_FLASHBAT = 8525 // m_iFlashBattery
const OFFSET_PLAYER_LONGJUMP = 8642 // 8641 // m_fLongJump
const OFFSET_PLAYER_BATTERY = 8646 // 8645 // m_iClientBattery
const OFFSET_PLAYER_FRAGS = 8651 // 8650 // that one has not been checked, and seems svencoop specific
const OFFSET_PLAYER_ACTIVE_ITEM = 8659 // 8658 // m_pActiveItem
const OFFSET_PLAYER_DEATHS = 8730 // 8729 // m_iDeaths
Actually while i was searching for those offsets, i've found those ones :
Code:
stock const m_iPlayerSound = 8437;

stock const m_flFlashLightTime = 8524;
stock const m_iFlashBattery = 8525;

stock const m_afButtonLast = 8526;
stock const m_afButtonPressed = 8527;
stock const m_afButtonReleased = 8528;

stock const m_afPhysicsFlags = 8541;

stock const m_tSneaking = 8643;
stock const m_iUpdateTime = 8644;
stock const m_iClientHealth = 8645;
stock const m_iClientBattery = 8646;
stock const m_iHideHUD = 8647;
stock const m_iHideHUD = 8647;
stock const m_iClientHideHUD = 8648;
stock const m_iFOV = 8649;
stock const m_iClientFOV = 8650;
stock const m_iClientFrags = 8651; // ???? svencoop specific offset ???
stock const m_rgpPlayerItems[6] = {8652,8653,...}; // MAX_ITEM_TYPES 6
// what is there 8660
stock const m_pActiveItem = 8659;
stock const m_pClientActiveItem = 8660;
stock const m_pLastItem = 8661;
stock const m_rgAmmo[32] = {8662,8663,...}; // -> 8669 // MAX_AMMO_SLOTS 32
stock const m_rgAmmoLast[32] = {8694,8695,...};

stock const m_vecAutoAim[3] = {8726,8727,8728};
stock const m_fOnTarget = 8729;
stock const m_iDeaths = 8730;
stock const m_iRespawnFrames = 8731;

stock const m_lastx = 8732;
stock const m_lasty = 8733;

stock const m_nCustomSprayFrames = 8734;
stock const m_flNextDecalTime = 8735;
Tested your new offset now it works fine, Thanks for update
__________________
Team-MMG CS1.6 Servers:
✅ MultiMod -- 103.179.44.152:27016
✅ Zombie Plague -- 103.179.44.152:27015
✅ Zombie Escape -- 103.179.44.152:27017
✅ Klassik Kombat -- 103.179.44.152:27018
✅ Boss-Battle -- 103.179.44.152:27019
yokomo is offline
Reply



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 09:06.


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