Raised This Month: $ Target: $400
 0% 

amx_fake amx_reveal


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
_Rustynails_
Junior Member
Join Date: Aug 2004
Old 08-29-2004 , 22:25   amx_fake amx_reveal
Reply With Quote #1

Just wanted to check if everything would run fine.
I got no errors when compiling. Just want to check if you see anything wrong?

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 }
_Rustynails_ is offline
Greenberet
AMX Mod X Beta Tester
Join Date: Apr 2004
Location: Vienna
Old 08-29-2004 , 23:50  
Reply With Quote #2

Quote:
cs_set_user_model(uid,"3")
are u sure, that u have the model 3.mdl in the cstrike/models/player/3/ order?
Greenberet is offline
Send a message via ICQ to Greenberet Send a message via MSN to Greenberet
KRoT@L
Member
Join Date: Aug 2004
Location: http://www.amxmod.net
Old 08-29-2004 , 23:55  
Reply With Quote #3

Code:
cs_set_user_model(uid,"6")
Wrong.
"6" is not a model..., valid models are :
CT models: sas, gign, gsg9, urban
T models: arctic, guerilla, leet, terror

Code:
cs_set_user_model(uid,"gign")
Code:
cs_set_user_model(uid,"leet")

Code:
if (cs_get_user_model(uid,"5",31)) {
Wrong.
cs_get_user_model returns nothing so you can't use it in a if statement

Code:
new player_model[32] cs_get_user_model(uid, player_model, 31) if(containi(player_model, "gign")!=-1){
Use something like that.
KRoT@L is offline
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 17:19.


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