Thread: Custom FOV
View Single Post
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 07-29-2022 , 09:56   Re: Custom FOV
Reply With Quote #7

I looked at the code. Here is code I made about half a decade ago. Welcome to it.
Code:
#include amxmodx #include amxmisc #define MAX_PLAYERS 32 new g_szMsgSetFov new g_iArg1[4]; public plugin_init ( ) {     register_plugin ( "Field Of View", "0.1", "spinx" )     register_clcmd ( "set_fov", "Command_SetFov", ADMIN_SLAY, "<name or #userid> <#>" )     g_szMsgSetFov = get_user_msgid ( "SetFOV" ) } public Command_SetFov ( id, level, cid ) {     if ( !cmd_access ( id, level, cid, 3 ) )         return PLUGIN_HANDLED     new szNick [ MAX_PLAYERS ]     read_argv ( 1, szNick, sizeof ( szNick ) - 1 )     read_argv ( 2, g_iArg1, charsmax(g_iArg1) )     new iPlayer = cmd_target ( id, szNick, CMDTARGET_OBEY_IMMUNITY | CMDTARGET_ONLY_ALIVE | CMDTARGET_ALLOW_SELF )     if ( !iPlayer )         return PLUGIN_HANDLED     set_fov ( iPlayer, str_to_num(g_iArg1) )     return PLUGIN_CONTINUE; } set_fov ( iClient, iValue ) {     emessage_begin ( MSG_ONE_UNRELIABLE, g_szMsgSetFov, _, iClient );     ewrite_byte ( iValue );     emessage_end ( ); }
__________________
DJEarthQuake is offline