View Single Post
Author Message
knekter
Senior Member
Join Date: Mar 2004
Location: PA
Old 03-19-2004 , 09:39   I get one error, and I dont know why
Reply With Quote #1

Theres 1 problem, but I cant figure it out, heres my code:

Code:
//////////////////////// #include <amxmodx> #include <amxmisc> #include <fun> #include <cstrike> //////////////////////// new PlayerFx[33] //////////////////////// public plugin_init() {     register_plugin("Radom FX","0.1","Ashade")     register_clcmd("say /fx","GiveFx",0,": gives a random fx")     register_cvar("amx_fx","1")     register_logevent("StartRound",2,"1=Round_Start") } public StartRound() {     server_cmd("mp_freezetime 0")     new players[32], numberofplayers, i, cur_id     get_players(players,numberofplayers)     for (i=0;i<numberofplayers;i++)     {     cur_id = players[i]     PlayerFx[cur_id] = 0     }     return PLUGIN_HANDLED } public GiveFx(id) {     new name[33]     get_user_name(id,name,32)     if(get_cvar_num("amx_fx") != 1)     {         return PLUGIN_HANDLED     }     if(PlayerFx[id] == 1)     {         client_print(id,print_chat,"[AMX] You already have a random FX")     return PLUGIN_HANDLED     }     new RndFx = random_num(1,6)     if(PlayerFx[id] != 1)     {         if(RndFx == 1)         {         PlayerFx[id] = 1         set_user_gravity(id,0.5)         client_print(0,print_chat,"[AMX] %s has randomly been given low gravity",name)         return PLUGIN_HANDLED         }         if(RndFx == 2)     {         new pID[2]         pID[0] = id         PlayerFx[id] = 1         set_user_noclip(id,1)         client_print(0,print_chat,"[AMX] %s has randomly been given noclip for 10 sec.",name)         set_task(10.0,"stop_clip",0,pID,1)         return PLUGIN_CONTINUE         }         if(RndFx == 3)     {             PlayerFx[id] = 1         set_user_rendering(id,kRenderFxNone,0,0,0,kRenderTransAlpha,50)             client_print(0,print_chat,"[AMX] %s has randomly been given transparency",name)             return PLUGIN_HANDLED         }     if(RndFx == 4)     {             PlayerFx[id] = 1         set_user_health(id,200)             client_print(0,print_chat,"[AMX] %s has randomly been given 200 hp",name)             return PLUGIN_HANDLED     }         if(RndFx == 5)     {         new pID[2]         pID[0] = id         PlayerFx[id] = 1             set_user_godmode(id,1)         client_print(0,print_chat,"[AMX] %s has randomly been given godmode for 10 sec.",name)         set_task(10.0,"stop_god",0,pID,1)         return PLUGIN_CONTINUE     }         if(RndFx == 6) && (cs_get_user_team(id) == "TERRORIST")     {         new pID[2]         pID[0] = id         PlayerFx[id] = 1             cs_set_user_model(id,"models\player\gign.mdl")         client_print(0,print_chat,"[AMX] %s has randomly had is player model changed for 10 sec.",name)         set_task(10.0,"stop_model",0,pID,1)         return PLUGIN_CONTINUE          }         if(RndFx == 6) && (cs_get_user_team(id) == "CT")     {         new pID[2]         pID[0] = id         PlayerFx[id] = 1             cs_set_user_model(id,"models\player\terror.mdl")         client_print(0,print_chat,"[AMX] %s has randomly had is player model changed for 10 sec.",name)         set_task(10.0,"stop_model",0,pID,1)         return PLUGIN_CONTINUE          }       return PLUGIN_HANDLED     }     return PLUGIN_HANDLED } public stop_clip(pID[0]) {     new name[33]     get_user_name(pID[0],name,32)     set_user_noclip(pID[0],0)     client_print(0,print_chat,"[AMX] Your 10 sec. of noclip are up %s",name)     return PLUGIN_HANDLED } public stop_god(pID[0]) {     new name[33]     get_user_name(pID[0],name,32)     set_user_godmode(pID[0],0)     client_print(0,print_chat,"[AMX] Your 10 sec. of noclip are up %s",name)     return PLUGIN_HANDLED } public stop_model(pID[0]) {     new name[33]     get_user_name(pID[0],name,32)     cs_reset_user_model(pID[0])     client_print(0,print_chat,"[AMX] Your 10 sec. of random model change are up %s",name)     return PLUGIN_HANDLED }

I dont think im using cs_get_user_team(id) correctly, plz HELP![/small]
__________________
More updates for Matrix Mod!
knekter is offline
Send a message via AIM to knekter Send a message via MSN to knekter