Raised This Month: $ Target: $400
 0% 

Camera Changer v1.1.1 | Updated 06/17/11


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Fun Stuff       
Larcyn
Senior Member
Join Date: Oct 2010
Old 05-05-2011 , 11:30   Camera Changer v1.1.1 | Updated 06/17/11
Reply With Quote #1

Camera Changer v1.1.1
by Larcyn

Description:

This is a Camera Changer, this plugin allows you to change your view in-game.
In the menu you can choose the view you would like to use.

Menu looks like this:

1. Information
2. 3rd view
3. Normal view
4. Drug view


Cvars:

PHP Code:
amx_cammenu 1/(default: 1) - Turn on/off the plugin 


Commands:


PHP Code:
say /camera
say 
/cam 


Changelog


PHP Code:
v1.0 Released
v1.1 
Code suggestions added.
v1.1.1 Code optimized
Code Suggestions? - Post a comment!


Attached Files
File Type: sma Get Plugin or Get Source (camerachanger.sma - 3855 views - 3.7 KB)
__________________

Taking private requests, PM me for information.
Selling HideNSeek & Jailbreak plugins.

Selling Achievement API System (PHP &
MySQL / nVault)

Last edited by Larcyn; 06-17-2011 at 12:37. Reason: Updated to v1.1.1
Larcyn is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-05-2011 , 11:32   Re: Camera Changer v1.0
Reply With Quote #2

When you zoom with a weapon, drug view just disappear.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Larcyn
Senior Member
Join Date: Oct 2010
Old 05-05-2011 , 11:35   Re: Camera Changer v1.0
Reply With Quote #3

Quote:
Originally Posted by ConnorMcLeod View Post
When you zoom with a weapon, drug view just disappear.
Is it possible to fix somehow?
__________________

Taking private requests, PM me for information.
Selling HideNSeek & Jailbreak plugins.

Selling Achievement API System (PHP &
MySQL / nVault)
Larcyn is offline
Xalus
Veteran Member
Join Date: Dec 2009
Location: Belgium
Old 05-05-2011 , 11:39   Re: Camera Changer v1.0
Reply With Quote #4

PHP Code:
new HasNormalView[33], HasPersonView[33], HasDrugView[33
->

PHP Code:
new HasView[33]
/* Example: HasView[player] = 0 -> Normal, and so. */ 
And euhm This is easyer I think if u make new versions and so:

PHP Code:
client_print(idprint_chat"This server is using Camera Changer Version 1.0 by Larcyn"
->

PHP Code:
#define PLUGIN "Camera Changer"
#define VERSION "1.0"
#define AUTHOR "Larcyn"

register_plugin(PLUGINVERSIONAUTHOR);

client_print(idprint_chat"This server is using %s Version %s by %s"PLUGINVERSIONAUTHOR
__________________
Retired.
Xalus is offline
Larcyn
Senior Member
Join Date: Oct 2010
Old 05-25-2011 , 10:50   Re: Camera Changer v1.0
Reply With Quote #5

Updated to Version 1.1
What's new?

Using 1 Variable instead of 3.
Information code fixed.
__________________

Taking private requests, PM me for information.
Selling HideNSeek & Jailbreak plugins.

Selling Achievement API System (PHP &
MySQL / nVault)

Last edited by Larcyn; 05-26-2011 at 14:21. Reason: Correction
Larcyn is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 05-25-2011 , 11:43   Re: Camera Changer v1.0
Reply With Quote #6

Quote:
Originally Posted by Larcyn View Post
Is it possible to fix somehow?
Hook "SetFOV" message and check when it sets to 90 (zoom out), then you can overwrite the FOV with your drugview fov if player has drugview.
__________________
Hunter-Digital is offline
Xalus
Veteran Member
Join Date: Dec 2009
Location: Belgium
Old 05-25-2011 , 12:12   Re: Camera Changer v1.1
Reply With Quote #7

Maybe some code things..
I dunno if they are better,
It looks better so :p

Not tested.

PHP Code:
new const Views[3][] = {
    
"to 3rd person!",
    
"back to normal",
    
"to drug view!"
};

new const 
ViewSettings[3] = {
    
CAMERA_3RDPERSON,
    
CAMERA_NONE,
    
CAMERA_NONE,
};

public 
ViewHandler(idmenuitem
{  
    if(
item == MENU_EXIT
    { 
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED
    

    new 
data[6], iName[64]
    new 
accesscallback
    
    menu_item_getinfo
menuitemaccessdata,5iName63callback ); 
    new 
key str_to_num(data
    
    if( 
HasView[id] == && key != ) {
        
// Reset Drug
        
message_begin(MSG_ONEget_user_msgid("SetFOV"), {0,0,0}, id)
        
write_byte(90)
        
message_end()
    }
    if( 
key != )
        
HasView[id] = key;
    
    switch(
key)  { 
        case 
1:  {
            
client_print(idprint_chat"This server is using Camera Changer Version %s by Larcyn"VERSION)
            
CmdChoose(id)
            return 
PLUGIN_HANDLED
        

        default: {
            
client_print(idprint_chat"%s Your view is successfully changed %s"prefixViews[key-2]);
            
set_view(idViewSettings[key-2]);
            
            if( 
HasView[id] == ) {
                
message_begin(MSG_ONEget_user_msgid("SetFOV"), {0,0,0}, id)
                
write_byte(170)
                
message_end()
            }
        }
    }
    return 
PLUGIN_HANDLED

__________________
Retired.
Xalus is offline
Old 05-26-2011, 14:19
Larcyn
This message has been deleted by Larcyn.
Larcyn
Senior Member
Join Date: Oct 2010
Old 06-17-2011 , 12:40   Re: Camera Changer v1.1.1 | Updated 06/17/11
Reply With Quote #8

Updated to Version 1.1.1
What's new?

Code optimized.

Block zoom is coming soon.
__________________

Taking private requests, PM me for information.
Selling HideNSeek & Jailbreak plugins.

Selling Achievement API System (PHP &
MySQL / nVault)
Larcyn is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 10-07-2011 , 19:09   Re: Camera Changer v1.1.1 | Updated 06/17/11
Reply With Quote #9

- Cache "SetFOV" message.
- Your menu is static so you need to generate it only one time.
- No need to use menu_item_getinfo, you can use directement item.
- Menu is not destroyed.

Plugin is fairly redundant. Try to do something more complete.

Unapproved for now.
__________________
Arkshine is offline
Old 01-17-2012, 05:37
reko_o
This message has been deleted by xPaw. Reason: Flooding "thanks" posts
jingojang
Senior Member
Join Date: Feb 2010
Location: The Moon
Old 07-04-2012 , 15:22   Re: Camera Changer v1.1.1 | Updated 06/17/11
Reply With Quote #10

Really nice, tried it earlier on your server. Really good job. Kind of slow if you got a bad computer with the fps and all though.
`
+k
jingojang 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 02:47.


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