Raised This Month: $ Target: $400
 0% 

can someone make me opaque


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
luoyunfeng
Junior Member
Join Date: May 2009
Old 06-16-2009 , 03:12   can someone make me opaque
Reply With Quote #1

/*
/
/
/ 3rd Person View
/ (ability for both teams)
/
/ by The_Thing
/
/
*/
#include <amxmodx>
#include <engine>
#define PLUGIN "3rd person view"
#define VERSION "1.2.4"
#define AUTHOR "The_Thing"
new g_3rdview_toggle
new bool:change_3rdview[33]
new maxplayers
public plugin_precache()
{
precache_model("models/rpgrocket.mdl")
}
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)

g_3rdview_toggle = register_cvar("amx_3rdview", "1")

register_event("DeathMsg", "Death", "a")
register_event("ResetHUD","NewRound","be")

register_concmd("changeview", "change_personal_view", ADMIN_USER, "- 3rd view toggle")

maxplayers = get_maxplayers()
}
public client_connect(id)
{
change_3rdview[id] = false
}
public client_disconnect(id)
{
change_3rdview[id] = false
}
public Death()
{
if (!get_pcvar_num(g_3rdview_toggle))
return;

new id = read_data( 2 )
if ((id <= 0) || (id > maxplayers))
return;

if (is_user_bot(id))
return;

if (change_3rdview[id])
{
change_3rdview[id] = false
set_view(id, CAMERA_NONE)
}
}
public NewRound(id)
{
if (!get_pcvar_num(g_3rdview_toggle))
return;

if (is_user_bot(id))
return;

if (is_user_alive(id))
{
change_3rdview[id] = false
set_view(id, CAMERA_NONE)
}
}
public change_personal_view(id)
{
if (!get_pcvar_num(g_3rdview_toggle))
return;

if (!is_user_alive(id))
return;

change_3rdview[id] = !change_3rdview[id]

if (change_3rdview[id])
set_view(id, CAMERA_3RDPERSON)
else
set_view(id, CAMERA_NONE)
}
luoyunfeng 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 13:56.


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