Raised This Month: $ Target: $400
 0% 

Help - 3rd Person View


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
PandaDnB
Senior Member
Join Date: Jan 2012
Old 09-14-2012 , 13:45   Help - 3rd Person View
Reply With Quote #1

Hello, i have this 3rd person view plugin but i want it to turn off and turn on with the same command(turned off by default). I'm attaching it.
Attached Files
File Type: sma Get Plugin or Get Source (camera.sma - 533 views - 565 Bytes)
PandaDnB is offline
Torge
Veteran Member
Join Date: Oct 2011
Old 09-14-2012 , 13:58   Re: Help - 3rd Person View
Reply With Quote #2

I think that can't work with 2 same commands.
Torge is offline
PandaDnB
Senior Member
Join Date: Jan 2012
Old 09-14-2012 , 14:01   Re: Help - 3rd Person View
Reply With Quote #3

I've seen servers that have it. Mine plugin wont work but i think that with some sort of check (if..) will work somehow.
PandaDnB is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 09-14-2012 , 14:19   Re: Help - 3rd Person View
Reply With Quote #4

PHP Code:
#include <amxmodx>
#include <engine>

new g_bView33 ]

public 
plugin_init()
{
    
register_plugin("Camera""1.0""PandaDNB")
    
register_clcmd("say /cam""ClCmd_Cam")
}

public 
plugin_precache()
{
    
precache_model("models/rpgrocket.mdl")
}

public 
client_putinserver(id)
{
    
g_bView[id] = false
}

public 
ClCmd_Cam(id)
{
    
set_view
    
(
        
id
        (
g_bView[id] = !g_bView[id]) ? CAMERA_3RDPERSON CAMERA_NONE
    
)
    return 
PLUGIN_HANDLED

__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 09-15-2012 at 05:24.
ConnorMcLeod is offline
PandaDnB
Senior Member
Join Date: Jan 2012
Old 09-14-2012 , 15:21   Re: Help - 3rd Person View
Reply With Quote #5

Doesn't compile
Attached Thumbnails
Click image for larger version

Name:	asd.jpg
Views:	123
Size:	96.4 KB
ID:	109444  
PandaDnB is offline
OnePL
BANNED
Join Date: May 2012
Location: GB
Old 09-14-2012 , 16:08   Re: Help - 3rd Person View
Reply With Quote #6

PHP Code:
#include <amxmodx>
#include <engine>

new bool:view[33] = false

public plugin_init() {
    
register_plugin("Camera""1.0""OnePL")

    
register_clcmd("say /cam""Camera")
}

public 
plugin_precache() precache_model("models/rpgrocket.mdl")

public 
Camera(id) {
    if(
view[id]) {
        
view[id] = false
        set_view
(idCAMERA_NONE)
    } else {
        
view[id] = true
        set_view
(idCAMERA_3RDPERSON)
    }
    
client_print(idprint_chat"Camera 3rd person: %s"view[id]? "on" "off")
    return 
PLUGIN_HANDLED

OnePL is offline
Send a message via ICQ to OnePL Send a message via AIM to OnePL Send a message via Yahoo to OnePL Send a message via Skype™ to OnePL
PandaDnB
Senior Member
Join Date: Jan 2012
Old 09-14-2012 , 16:46   Re: Help - 3rd Person View
Reply With Quote #7

Thank you !
PandaDnB is offline
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 09-14-2012 , 20:34   Re: Help - 3rd Person View
Reply With Quote #8

Quote:
Originally Posted by PandaDnB View Post
Doesn't compile
Delete the comma after CAMERA_NONE, that's all lol
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 09-15-2012 , 05:25   Re: Help - 3rd Person View
Reply With Quote #9

Quote:
Originally Posted by meTaLiCroSS View Post
Delete the comma after CAMERA_NONE, that's all lol
Yes, fixed.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Old 12-13-2014, 10:20
Jhob94
This message has been deleted by Jhob94. Reason: nothing..
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 08:14.


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