Raised This Month: $ Target: $400
 0% 

Solved Camera


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
blAck.
Member
Join Date: Jun 2018
Old 07-14-2018 , 10:17   Camera
Reply With Quote #1

Hey, I just started coding and I need help with small cs 1.6 plugin that I'm trying to make.
I know there is already one plugin that does this for you but I wanted to make my own with some difference.

It's about camera plugin. I'm trying to make when a player types /cam, he goes into 3rd camera mode, and if he is already in 3rd camera mode, he goes into first mode.
But with this code, I can only go in 3rd person, and I cannot come back in 1st person. Why? I think this code should be fine.

Code:
public setview(id)
{
	if(set_view(id, CAMERA_NONE)) {
		
		set_view(id, CAMERA_3RDPERSON)
		
	} else if(set_view(id, CAMERA_3RDPERSON)) {
		
		set_view(id, CAMERA_NONE)
		
		return PLUGIN_HANDLED
	} else {
	return PLUGIN_HANDLED
	}
	return PLUGIN_HANDLED
}

Last edited by blAck.; 08-05-2018 at 14:02.
blAck. is offline
 



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 12:38.


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