View Single Post
Author Message
Franc1sco
Veteran Member
Join Date: Oct 2010
Location: Spain (Madrid)
Old 12-26-2015 , 13:30   [CS:GO] First Person View Models Interface (with World Models) [Updated 26-Jan-2021]
Reply With Quote #1

This plugin is not against valve's rule if you obey this -> https://forums.alliedmods.net/showpo...44&postcount=8

Demostration video:



Description:

A easy interface for developers for add custom view models to the weapons.


Natives:

PHP Code:
/**
 * Add a custom view model to a weapon
 *
 * @param client     Player for check
 * @String weapon     Weapon to replace
 * @param weaponview_index     The weapon precached index with the view model.
 * @noreturn
 */
native void FPVMI_AddViewModelToClient(int clientchar[] weaponint weaponview_index=-1);

/**
 * Add a custom world model to a weapon
 *
 * @param client     Player for check
 * @String weapon     Weapon to replace
 * @param weaponwold_index    The weapon precached index with the view model. -1 = default model
 * @noreturn
 */
native void FPVMI_AddWorldModelToClient(int clientchar[] weaponint weaponworld_index=-1);

/**
 * Add a custom drop model to a weapon
 *
 * @param client     Player for check
 * @String weapon     Weapon to replace
 * @String dropmodel    The weapon model
 * @noreturn
 */
native void FPVMI_AddDropModelToClient(int clientchar[] weaponchar[] dropmodel="none");

/**
 * Return the custom world model index of a client
 *
 * @param client     Player for check
 * @String weapon     Weapon to search
 * @return Return the custom world model index of a client. -1 if the client dont have a custom world model
 */
native int FPVMI_GetClientWorldModel(int clientchar[] weapon);

/**
 * Return the custom view model index of a client
 *
 * @param client     Player for check
 * @String weapon     Weapon to search
 * @return Return the custom wview model index of a client. -1 if the client dont have a custom view model
 */
native int FPVMI_GetClientViewModel(int clientchar[] weapon);

/**
 * Return the custom drop model index of a client
 *
 * @param client     Player for check
 * @String weapon     Weapon to search
 * @String drop     copy the dropmodel string
 * @noreturn
 */
native void FPVMI_GetClientDropModel(int clientchar[] weaponchar[] dropmodel);

/**
 * Set a custom view/world model to a weapon
 *
 * @param client     Player for check
 * @String weapon     Weapon to replace
 * @param weapon_index     The weapon precached index with the view model. -1 = default model
 * @param weaponworld_index    The weapon precached index with the view model. -1 = default model
 * @param dropmodel             The weapon drop model
 * @noreturn
 */
native void FPVMI_SetClientModel(int clientchar[] weaponint weaponview_index=-1int weaponworld_index=-1char[] dropmodel="none");

/**
 * Remove a custom view model to a weapon
 *
 * @param client     Player for check
 * @String weapon     Weapon to replace
 * @noreturn
 */
native void FPVMI_RemoveViewModelToClient(int clientchar[] weapon);

/**
 * Remove a custom world model to a weapon
 *
 * @param client     Player for check
 * @String weapon     Weapon to replace
 * @noreturn
 */
native void FPVMI_RemoveWorldModelToClient(int clientchar[] weapon);

/**
 * Remove a custom drop model to a weapon
 *
 * @param client     Player for check
 * @String weapon     Weapon to replace
 * @noreturn
 */
native void FPVMI_RemoveDropModelToClient(int clientchar[] weapon);

/**
 * Called when a View model has been set.
 *
 * @param client            Client.
 * @String weapon     Weapon
 * @param weapon_index     The weapon precached index
 * @noreturn
 */
forward void FPVMI_OnClientViewModel(int client, const char[] weaponint weapon_index);

/**
 * Called when a World model has been set.
 *
 * @param client            Client.
 * @String weapon     Weapon
 * @param weaponworld_index     The weapon precached index 
 * @noreturn
 */
forward void FPVMI_OnClientWorldModel(int client, const char[] weaponint weaponworld_index);

/**
 * Called when a drop model has been set.
 *
 * @param client            Client.
 * @String weapon     Weapon
 * @String dropmodel     The weapon dropmodel
 * @noreturn
 */
forward void FPVMI_OnClientDropModel(int client, const char[] weaponchar[] dropmodel); 
Example plugin:
https://github.com/Franc1sco/fpvmi-s...ualintinity.sp


You can get more view models here -> http://gamebanana.com

Editing the models:
https://forums.alliedmods.net/showpo...8&postcount=95


Credits:

Custom viewmodel snippet - https://forums.alliedmods.net/showthread.php?t=273885


Donations (optional):

If you apreciate my work, you can donate me via paypal or with a trade offer


Download:

Main repository
Direct download
Code changes
__________________
Veteran Coder -> Activity channel
Coding on CS2 and taking paid and free jobs.

Contact: Steam, Telegram or discord ( franug ).

You like my work? +Rep in my steam profile comments or donate.


Last edited by Franc1sco; 01-26-2021 at 04:40.
Franc1sco is offline
Send a message via MSN to Franc1sco