Cstrike Module to Fakemeta [+Ham]

For scripting examples for learning how to use AMXX.
User avatar
Archive-Poster
Posts: 1367
Gender:
United States of America

Cstrike Module to Fakemeta [+Ham]

Post by Archive-Poster »

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: Select all

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: Select all

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);
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: Select all

#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.
Attachments
fm_cstrike_plugin.inc.zip
(557 Bytes) Downloaded 6 times
fm_cstrike.sma.zip
(1.45 KiB) Downloaded 7 times
fm_cstrike.inc.zip
(4.67 KiB) Downloaded 11 times

Who is online

Users browsing this forum: No registered users and 1 guest