Raised This Month: $ Target: $400
 0% 

I Need Help With VipName


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
frikki9
Member
Join Date: Mar 2010
Old 11-24-2010 , 12:26   I Need Help With VipName
Reply With Quote #1

How To Add Acces Like I Want It To Work For Acces Flag U?
Quote:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <geoip>
#include <colorchat>

#define PLUGIN_NAME "VipName"
#define PLUGIN_VERSION "1.1"
#define PLUGIN_AUTHOR "Someone"

new players[33][32]
new num[33]

public plugin_init()
{
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR)

register_clcmd("say", "hook_say")
register_clcmd("say_team", "hook_team_say")
}

public hook_say(id)
{
new chat[192]
read_args(chat, 191)
remove_quotes(chat)

new name[32], userip[16], usercountry[46], message[256]
get_user_name(id, name, 31)
get_user_ip(id, userip, 15, 1)
geoip_country(userip, usercountry, 45)

new CsTeams:userteam =cs_get_user_team(id)
if(equal(chat, ""))
return PLUGIN_HANDLED

if (is_user_alive(id))
{
format(message, 255, "^x03[Vip]^x04*Alive*^x03%s^x03:^x04 %s", name, chat)
color_chat(0, id, message)
}
else if (!is_user_alive(id) && userteam != CS_TEAM_SPECTATOR)
{
format(message, 255, "^x03[Vip]^x04*Dead*^x03%s^x03:^x04 %s", name, chat)
color_chat(0, id, message)
}
else
{
format(message, 255, "^x03[Vip]^x04*Spec*^x03%s^x03:^x04 %s", name, chat)
color_chat(0, id, message)
}
return PLUGIN_HANDLED
}

public hook_team_say(id)
{
new chat[192]
read_args(chat, 191)
remove_quotes(chat)

new name[32], userip[16], usercountry[46], message[256], team[32]
get_user_name(id, name, 31)
get_user_ip(id, userip, 15, 1)
geoip_country(userip, usercountry, 45)

if(equal(chat, ""))
return PLUGIN_HANDLED

new CsTeams:userteam =cs_get_user_team(id)
if (userteam == CS_TEAM_T)
{
get_players(players[id], num[id], _, "TERRORIST")
team = "(Terrorist)"
}
else if (userteam == CS_TEAM_CT)
{
get_players(players[id], num[id], _, "CT")
team = "(Counter-Terrorist)"
}
else
{
get_players(players[id], num[id], _, "SPECTATOR")
team = "(Spectator)"
}
for (new a = 0; a < num[id]; ++a)
{
new i = players[id][a]
if (is_user_alive(id))
{
format(message, 255, "^x03[Vip]^x04%s^x03%s^x03:^x04 %s", team, name, chat)
color_chat(i, id, message)
}
else if (!is_user_alive(id) && userteam != CS_TEAM_SPECTATOR)
{
format(message, 255, "^x03[Vip]^x04%s^x03%s^x03:^x04 %s", team, name, chat)
color_chat(i, id, message)
}
else
{
format(message, 255, "^x03[Vip]^x04%s^x03%s^x03:^x04 %s", team, name, chat)
color_chat(i, id, message)
}
}
return PLUGIN_HANDLED
}

public color_chat(playerid, colorid, message[])
{
message_begin(playerid?MSG_ONE:MSG_ALL, get_user_msgid("SayText"), {0, 0, 0}, playerid)
write_byte(colorid)
write_string(message)
message_end()
}
__________________
DeNim

Found You

Add Me On Steam!
frikki9 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 11:19.


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