Raised This Month: $51 Target: $400
 12% 

[REQ] fov changer


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
lazarev
Veteran Member
Join Date: Sep 2008
Old 04-02-2009 , 10:33   [REQ] fov changer
Reply With Quote #1

can somebody make a plugin that changes fov?
i saw it on ZP(zombie plague) , when you transfer to zombie you have a bit bigger fov than humans
lazarev is offline
TheRadiance
Senior Member
Join Date: Nov 2007
Location: Kazakhstan
Old 04-02-2009 , 10:54   Re: [REQ] fov changer
Reply With Quote #2

Not sure, but should worok:
PHP Code:
#include < amxmodx >
#include < amxmisc >

new g_szMsgSetFov
new g_iSetFov 33 ]

public 
plugin_init ( )
{
    
register_plugin "amx_fov""1.0""lazarev" )
    
register_concmd "amx_fov""Command_SetFov"ADMIN_SLAY"<name or #userid> <1|0>" )

    
g_szMsgSetFov get_user_msgid "SetFOV" )


public 
Command_SetFov idlevelcid )
{
    if ( !
cmd_access idlevelcid) )
        return 
PLUGIN_HANDLED

    
new szNick 32 ]
    new 
szMode ]
    
read_argv 1szNicksizeof szNick ) - )
    
read_argv 2szModesizeof szMode ) - )

    new 
iPlayer cmd_target idszNickCMDTARGET_OBEY_IMMUNITY CMDTARGET_ONLY_ALIVE )
   
    if ( !
iPlayer )
        return 
PLUGIN_HANDLED

    
new iMode str_to_num szMode )

    if ( ( 
iMode != ) || ( iMode != ) )
        return 
PLUGIN_HANDLED

    
if ( ( !iMode && !g_iSetFov iPlayer ] ) || ( iMode && g_iSetFov iPlayer ] ) )
        return 
PLUGIN_HANDLED

    set_fov 
iPlayer, ( !iMode ) ? 90 140 )
    
g_iSetFov iPlayer ] = iMode
    
return PLUGIN_HANDLED
}

set_fov iClientiValue )
{
    
message_begin MSG_ONEg_szMsgSetFov_iClient )
    
write_byte iValue )
    
message_end ( )

TheRadiance is offline
Send a message via ICQ to TheRadiance
lazarev
Veteran Member
Join Date: Sep 2008
Old 04-02-2009 , 11:54   Re: [REQ] fov changer
Reply With Quote #3

sorry, but it doesn't work
lazarev is offline
TheRadiance
Senior Member
Join Date: Nov 2007
Location: Kazakhstan
Old 04-02-2009 , 21:41   Re: [REQ] fov changer
Reply With Quote #4

now works:
PHP Code:
#include < amxmodx > 
#include < amxmisc > 

new g_szMsgSetFov 
new g_iSetFov 33 

public 
plugin_init ( ) 

    
register_plugin "amx_fov""1.0""lazarev" 
    
register_concmd "amx_fov""Command_SetFov"ADMIN_SLAY"<name or #userid> <1|0>" 

    
g_szMsgSetFov get_user_msgid "SetFOV" 
}  

public 
Command_SetFov idlevelcid 

    if ( !
cmd_access idlevelcid) ) 
        return 
PLUGIN_HANDLED 

    
new szNick 32 
    new 
szMode 
    
read_argv 1szNicksizeof szNick ) - 
    
read_argv 2szModesizeof szMode ) - 

    new 
iPlayer cmd_target idszNickCMDTARGET_OBEY_IMMUNITY CMDTARGET_ONLY_ALIVE CMDTARGET_ALLOW_SELF 
    
    if ( !
iPlayer 
        return 
PLUGIN_HANDLED 

    
new iMode str_to_num szMode 

    if ( ( 
iMode != ) && ( iMode != ) ) 
        return 
PLUGIN_HANDLED 

    
if ( ( !iMode && !g_iSetFov iPlayer ] ) || ( iMode && g_iSetFov iPlayer ] ) ) 
        return 
PLUGIN_HANDLED 

    set_fov 
iPlayer, ( !iMode ) ? 90 140 
    
g_iSetFov iPlayer ] = iMode 
    
return PLUGIN_HANDLED 


set_fov iClientiValue 

    
message_begin MSG_ONEg_szMsgSetFov_iClient 
    
write_byte iValue 
    
message_end ( ) 

TheRadiance is offline
Send a message via ICQ to TheRadiance
lazarev
Veteran Member
Join Date: Sep 2008
Old 04-03-2009 , 04:26   Re: [REQ] fov changer
Reply With Quote #5

nice! ^_^
+karma
lazarev 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 13:20.


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