Just wanted to check if everything would run fine.
I got no errors when compiling. Just want to check if
Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
public plugin_init() {
register_plugin("AMX-TEAM-FAKE","0.1","Rustynails")
register_clcmd("amx_team_fake","do_fake",ADMIN_BAN)
register_plugin("AMX-TEAM-REVEAL","0.1","Rustynails")
register_clcmd("amx_team_reveal","do_reveal",ADMIN_BAN)
}
public do_fake(id)
{
new user[32], uid
read_argv(1,user,31)
uid = find_player("bhl",user)
if (access(id,ADMIN_BAN)) {
if (uid) {
if (!access(uid,ADMIN_IMMUNITY)) {
if (get_user_team(uid) == 1) {
cs_set_user_model(uid,"6")
console_print(id,"Fake changed player's team. They now look like a CT.")
} else if (get_user_team(uid) == 2) {
cs_set_user_model(uid,"3")
console_print(id,"Fake changed player's team. They now look like a T.")
} else if (get_user_team(uid) == 3) {
console_print(id,"User is currently a spectator. Cannot fake change their team.")
}
} else {
console_print(id,"Cannot use this command on this player. He/she is immune.")
}
} else {
console_print(id,"Could not recognize that user.")
}
} else {
console_print(id,"You do not have enough access to use this command.")
}
return PLUGIN_HANDLED
}
public do_reveal(id)
{
new user[32], uid
read_argv(1,user,31)
uid = find_player("bhl",user)
if (access(id,ADMIN_BAN)) {
if (uid) {
if (!access(uid,ADMIN_IMMUNITY)) {
if (get_user_team(uid) == 1) {
if (cs_get_user_model(uid,"5",31)) {
cs_set_user_model(id,"1")
console_print(id,"Revealed player.")
} else if (cs_get_user_model(uid,"6",32)) {
cs_set_user_model(id,"1")
console_print(id,"Revealed player.")
} else if (cs_get_user_model(uid,"7",32)) {
cs_set_user_model(id,"1")
console_print(id,"Revealed player.")
} else if (cs_get_user_model(uid,"8",32)) {
cs_set_user_model(id,"1")
console_print(id,"Revealed player.")
} else {
console_print(id,"That user was not faking teams.")
}
} else if (get_user_team(uid) == 2) {
if (cs_get_user_model(uid,"1",32)) {
cs_set_user_model(id,"5")
console_print(id,"Revealed player.")
} else if (cs_get_user_model(uid,"2",32)) {
cs_set_user_model(id,"5")
console_print(id,"Revealed player.")
} else if (cs_get_user_model(uid,"3",32)) {
cs_set_user_model(id,"5")
console_print(id,"Revealed player.")
} else if (cs_get_user_model(uid,"4",32)) {
cs_set_user_model(id,"5")
console_print(id,"Revealed player.")
} else {
console_print(id,"That user was not faking teams.")
}
} else if (get_user_team(uid) == 3) {
console_print(id,"Player cannot be faking teams. He is a spectator.")
}
} else {
console_print(id,"Cannot use this command on this player. He/she is immune.")
}
} else {
console_print(id,"Could not recognize that user.")
}
} else {
console_print(id,"You do not have enough access to use this command.")
}
return PLUGIN_HANDLED
}