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

Cstrike Module to Fakemeta [+Ham]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 03-13-2009 , 20:03   Cstrike Module to Fakemeta [+Ham]
Reply With Quote #1

DO NOT USE THIS, STICK WITH CSTRIKE MODULE


Introduction:

I have seen many people asking for fakemeta conversions of the Cstrike module's functions.
So, I have converted all of them into an include, and 2 of them need an extra plugin to run.


Include Functions:

Code:
fm_cs_get_user_deaths(client)
fm_cs_set_user_deaths(client, deaths)
fm_cs_get_hostage_follow(entity)
fm_cs_set_hostage_follow(entity)
fm_cs_get_hostage_id(entity)
fm_cs_get_user_bpammo(client, weapon)
fm_cs_set_user_bpammo(client, weapon, ammo)
fm_cs_get_user_defuse(client)
fm_cs_set_user_defuse(client, defusekit=1, r=0, g=160, b=0, icon[]="defuser", flash=0)
fm_cs_get_user_buyzone(client)
fm_cs_get_user_hasprim(client)
fm_cs_get_user_model(client, model[], len)
fm_cs_set_user_model(client, const model[])
fm_cs_reset_user_model(client)
fm_cs_get_user_money(client)
fm_cs_set_user_money(client, money, flash=1)
fm_cs_get_user_nvg(client)
fm_cs_set_user_nvg(client, nvgoggles=1)
fm_cs_get_user_plant(client)
fm_cs_set_user_plant(client, plant=1, showbombicon=1)
fm_cs_set_user_team(client, {CsTeams,_}:team, {CsInternalModel,_}:model=CS_DONTCHANGE)
CsTeams:fm_cs_get_user_team(client, &{CsInternalModel,_}:model=CS_DONTCHANGE)
fm_cs_get_user_vip(client)
fm_cs_set_user_vip(client, vip=1, model=1, scoreboard=1)
fm_cs_get_user_tked(client)
fm_cs_set_user_tked(client, tk=1, subtract=1)
fm_cs_get_user_driving(client)
fm_cs_get_user_shield(client)
fm_cs_get_user_stationary(client)
fm_cs_get_user_armor(client, &CsArmorType:armortype)
fm_cs_set_user_armor(client, armorvalue, CsArmorType:armortype)
fm_cs_get_weapon_burst(entity)
fm_cs_set_weapon_burst(entity, burstmode=1)
fm_cs_get_weapon_silen(entity)
fm_cs_set_weapon_silen(entity, silence=1, draw_animation=1)
fm_cs_get_weapon_ammo(entity)
fm_cs_set_weapon_ammo(entity, clip)
fm_cs_get_weapon_id(entity)
fm_cs_user_spawn(client)
fm_cs_get_armoury_type(entity)
fm_cs_set_armoury_type(entity, type)
fm_cs_get_user_mapzones(client)
fm_cs_set_user_mapzones(client, mapzones)
fm_cs_get_user_submodel(client)
fm_cs_set_user_submodel(client, value)
Float:fm_cs_get_user_lastactivity(client)
fm_cs_set_user_lastactivity(client, Float:value)
fm_cs_get_user_hostagekills(client)
fm_cs_set_user_hostagekills(client, value)
Float:fm_cs_get_hostage_lastuse(entity)
fm_cs_set_hostage_lastuse(entity, Float:value)
Float:fm_cs_get_hostage_nextuse(entity)
fm_cs_set_hostage_nextuse(entity, Float:value)
Float:fm_cs_get_c4_explode_time(entity)
fm_cs_set_c4_explode_time(entity, Float:value)
bool:fm_cs_get_c4_defusing(entity)
fm_cs_set_c4_defusing(entity, bool:defusing)


Plugin Functions:

Code:
fm_cs_get_no_knives();
fm_cs_set_no_knives(noknives=0);
fm_cs_set_user_zoom(client, type, mode);
fm_cs_get_user_zoom(client);


Source:

I went into the SVN for the Cstrike module and found all the code necessary to create this.
Offsets and Other Constants
How the Functions are Coded


How to Use the Extra Plugin:

When making plugins with the extra plugin include, the only important part is the order in which the plugins are in your plugins.ini.
The order that is necessary is that the fm_cstrike.amxx must be above the plugins that use it in the plugins.ini.
However, I recommend to put it at the top so that you won't have to move it later.

Inside of the plugin that uses it, you need to include the plugin-specific one.
Code:
#include <fm_cstrike_plugin>


Requirements:

Fakemeta module
HamSandwich module


Notes:

This is not supposed to be a replacement for the Cstrike module!
It is, in fact, proven to use the Cstrike module for these functions rather than this include due to efficiency.
This was created to show how the Cstrike module can be used in Fakemeta (and HamSandwich).
More information about this can be found here.


Credits:

Thanks to arkshine for the plugin when using fm_cs_set_user_zoom() and fm_cs_get_user_zoom().
Attached Files
File Type: inc fm_cstrike_plugin.inc (620 Bytes, 1019 views)
File Type: sma Get Plugin or Get Source (fm_cstrike.sma - 2322 views - 3.7 KB)
File Type: inc fm_cstrike.inc (20.4 KB, 1574 views)
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!

Last edited by xPaw; 03-13-2015 at 09:48.
Exolent[jNr] is offline
Starsailor
horrible hahah
Join Date: Aug 2008
Location: Buenos Aires
Old 03-13-2009 , 20:08   Re: Cstrike Module to Fakemeta [+Ham]
Reply With Quote #2

thanks, i will use it

gj Exo
__________________
Find my plugins here..

Ex - Spanish Moderator.
Starsailor is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 03-13-2009 , 23:10   Re: Cstrike Module to Fakemeta [+Ham]
Reply With Quote #3

Nice work!
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
L//
Senior Member
Join Date: Aug 2008
Location: Not found
Old 03-14-2009 , 00:09   Re: Cstrike Module to Fakemeta [+Ham]
Reply With Quote #4

Excellent
__________________
L// is offline
Send a message via MSN to L//
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-14-2009 , 03:27   Re: Cstrike Module to Fakemeta [+Ham]
Reply With Quote #5

hostages stocks won't work.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
danielkza
AMX Mod X Plugin Approver
Join Date: May 2007
Location: São Paulo - Brasil
Old 03-14-2009 , 03:30   Re: Cstrike Module to Fakemeta [+Ham]
Reply With Quote #6

Just a suggestion, add dynamic natives with their original cstrike names, so this can be a drop-in replacement for the cstrike module for those who want to get rid of it.
__________________

Community / No support through PM
danielkza is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 03-14-2009 , 05:19   Re: Cstrike Module to Fakemeta [+Ham]
Reply With Quote #7

oh my god
__________________
xPaw is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 03-14-2009 , 07:15   Re: Cstrike Module to Fakemeta [+Ham]
Reply With Quote #8

Aye I'll look for this sure! GW
SnoW is offline
Send a message via MSN to SnoW
Empowers
BANNED
Join Date: Feb 2009
Location: Ukraine
Old 03-14-2009 , 07:18   Re: Cstrike Module to Fakemeta [+Ham]
Reply With Quote #9

Wow!
Really Usefull
Thx
Empowers is offline
Send a message via ICQ to Empowers
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 03-14-2009 , 13:42   Re: Cstrike Module to Fakemeta [+Ham]
Reply With Quote #10

Quote:
Originally Posted by ConnorMcLeod View Post
hostages stocks won't work.
Are you saying that you tested and they don't work, or you see an error in the code?


Quote:
Originally Posted by danielkza View Post
Just a suggestion, add dynamic natives with their original cstrike names, so this can be a drop-in replacement for the cstrike module for those who want to get rid of it.
I might, if enough people find it beneficial.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Reply


Thread Tools
Display Modes

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 18:58.


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