Raised This Month: $ Target: $400
 0% 

enter the matrix bugs


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Burnzy
Veteran Member
Join Date: Apr 2004
Old 08-04-2004 , 23:35   enter the matrix bugs
Reply With Quote #1

i dont no what is wrong. Im doing stuff for my matrix plugin but the following dont work:
-Not giving deagle when enter matrix
-Not playing sound
-The whole client thing isnt working
-Speed isnt working

heres the plugins... does anyone no whats wrong? (PISSIN ME OFF!!!! )

Code:
#include <amxmodx> #include <amxmisc> #include <cstrike> #include <fun> new is_matrix[33] new is_matrix2[33] public change_matrix(id,level,cid) {    if (!cmd_access(id,level,cid,1)) {    return PLUGIN_CONTINUE    }    new arg[32]    new player    read_argv(1,arg,32)    if(arg[0])  {    player = cmd_target(id,arg,0)    if(!player)    return PLUGIN_HANDLED }    new name[32]    new admin[32]    new team=get_user_team(player)    get_user_name(player,name,31)    get_user_name(id,admin,31)    if (!is_matrix[player]){      if (team == 1){        if (file_exists("models/player/neo/neo.mdl")==1){           cs_set_user_model(player,"smith")        }        give_item(player,"weapon_deagle")        set_hudmessage( 0, 200, 0, -1.0, -1.0, 0, 6.0, 6.0, 0.5, 1.5, 4 )        show_hudmessage(player, "You have Entered the Matrix!")        console_print(id,"%s has entered the Matrix",name)      }else if (team == 2){        if (file_exists("models/player/neo/neo.mdl")==1){           cs_set_user_model(player,"neo")        }        give_item(player,"weapon_deagle")        set_hudmessage( 0, 200, 0, -1.0, -1.0, 0, 6.0, 6.0, 0.5, 1.5, 4 )        show_hudmessage(player, "You have Entered the Matrix!")        console_print(id,"%s has entered the Matrix",name)      }      if (file_exists("sound/ambience/realworld.wav")==1){         emit_sound(player,CHAN_STATIC, "ambience/realworld.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)      }      set_user_health(player,get_cvar_num("matrix_health"))      set_user_armor(player,get_cvar_num("matrix_armor"))      set_user_gravity(player,0.50)      set_user_maxspeed(player,550.0)      is_matrix[player] = true      is_matrix2[id] = true    }else{      console_print(id,"% is already in the Matrix",name)    }    return PLUGIN_HANDLED } public change_human(id,level,cid) {    if (!cmd_access(id,level,cid,1)) {    return PLUGIN_CONTINUE    }    new arg[32]    new player    read_argv(1,arg,32)    if(arg[0])  {    player = cmd_target(id,arg,0)    if(!player)    return PLUGIN_HANDLED }    new name[32]    new admin[32]    get_user_name(player,name,31)    get_user_name(id,admin,31)    if (is_matrix[player]){      is_matrix[player] = false      is_matrix2[id] = false      cs_reset_user_model(player)      set_user_gravity(player,1.0)      set_user_maxspeed(player, 320.0)      set_hudmessage( 0, 200, 0, -1.0, -1.0, 0, 6.0, 6.0, 0.5, 1.5, 4 )      show_hudmessage(player, "You have left the Matrix")      console_print(id, "%s was taken out of the Matrix!",name)    }else{      console_print(id, "%s was never in the Matrix!",name)    }    return PLUGIN_HANDLED } public client_matrix(id) {    if (get_cvar_num("matrix_client")==1){      new name2[32]      new team2=get_user_team(id)      get_user_name(id,name2,31)      if (!is_matrix[id]){        if (team2 == 1){          if (file_exists("models/player/smith/smith.mdl")==1){             cs_set_user_model(id,"smith")          }          set_hudmessage( 0, 200, 0, -1.0, -1.0, 0, 6.0, 6.0, 0.5, 1.5, 4 )          show_hudmessage(id, "You have Entered the Matrix!")          client_print(id,print_chat,"[Matrix] You have Entered the Matrix")        }else if (team2 == 2){          if (file_exists("models/player/neo/neo.mdl")==1){             cs_set_user_model(id,"neo")          }          set_hudmessage( 0, 200, 0, -1.0, -1.0, 0, 6.0, 6.0, 0.5, 1.5, 4 )          show_hudmessage(id, "You have Entered the Matrix!")          client_print(id,print_chat,"[Matrix] You have Entered the Matrix")        }        if (file_exists("sound/ambience/realworld.wav")==1){           emit_sound(id,CHAN_STATIC, "ambience/realworld.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)        }        set_user_health(id,get_cvar_num("matrix_health"))        set_user_armor(id,get_cvar_num("matrix_armor"))        set_user_gravity(id,0.50)        give_item(id,"weapon_deagle")        set_user_maxspeed(id,550.0)        is_matrix2[id] = true      }else if (is_matrix[id]){        client_print(id,print_chat,"[Matrix] You are already in the Matrix")      }    }else if (get_cvar_num("matrix_client")==0){      client_print(id,print_chat,"[Matrix] The Admin has Disabled it so Clients can NOT Enter the Matrix Manually")    }    return PLUGIN_HANDLED } public client_human(id) {    if (get_cvar_num("matrix_client")==1){      new name2[32]      get_user_name(id,name2,31)      if (is_matrix[id]){        cs_reset_user_model(id)        set_hudmessage( 0, 200, 0, -1.0, -1.0, 0, 6.0, 6.0, 0.5, 1.5, 4 )        show_hudmessage(id, "You have Exited the Matrix!")        client_print(id,print_chat,"[Matrix] You have Exited the Matrix")        set_user_gravity(id,1.0)        set_user_maxspeed(id,320.0)        is_matrix2[id] = false      }else if (!is_matrix[id]){        client_print(id,print_chat,"[Matrix] You were never in the Matrix")      }    }else if (get_cvar_num("matrix_client")==0){      client_print(id,print_chat,"[Matrix] The Admin has Disabled it so Clients can NOT Leave the Matrix Manually")    }    return PLUGIN_HANDLED } public weapon(){      new id = read_data (1)    if (is_matrix[id]) {      set_user_maxspeed(id,550.0)      new clip, ammo        new weapon_id=get_user_weapon(id,clip,ammo)        new weapon2[32]        if ( weapon_id!=CSW_DEAGLE ) return PLUGIN_CONTINUE            if ( clip < 2){             get_weaponname(weapon_id,weapon2,31)             give_item(id, weapon2)           client_cmd(id, weapon2)           client_cmd(id, weapon2) //checking if multi sends helps           client_cmd(id, weapon2) //checking if multi sends helps        }      }      return PLUGIN_CONTINUE   } public round_reset(id){    new team=get_user_team(id)    if (is_matrix2[id]) {      if (team == 1){         if (file_exists("models/player/smith/smith.mdl")==1){            cs_set_user_model(id,"smith")         }         set_user_health(id,get_cvar_num("matrix_health"))         set_user_armor(id,get_cvar_num("matrix_armor"))         set_user_gravity(id,0.50)         set_user_maxspeed(id,550.0)      }else if(team == 2){         if (file_exists("models/player/neo/neo.mdl")==1){            cs_set_user_model(id,"neo")         }         set_user_health(id,get_cvar_num("matrix_health"))         set_user_armor(id,get_cvar_num("matrix_armor"))         set_user_gravity(id,0.50)         set_user_maxspeed(id,550.0)      }    }    return PLUGIN_CONTINUE } public plugin_init() {     register_plugin("Enter the Matrix","1.92","Burnzy")     register_concmd("amx_matrix","change_matrix",ADMIN_LEVEL_A,"<nick|authid|#userid>")     register_concmd("amx_unmatrix","change_human",ADMIN_LEVEL_A,"<nick|authid|#userid>")     register_clcmd("/matrix","client_matrix",0,"Clients Enter Matrix Manually")     register_clcmd("/unmatrix","client_human",0,"Clients Leave Matrix Manually")     register_cvar("matrix_client","0") //Allows Clients to Enter Matrix if 1     register_cvar("matrix_armor","200") //Changes Armor of Matrix Players     register_cvar("matrix_health","200") //Changes Health of Matrix Players     register_event("CurWeapon","weapon","be","1=1")     register_event("ResetHUD","round_reset","b")     set_task(1.0,"check_cvars",0,"",0,"b")     return PLUGIN_CONTINUE } public plugin_precache() {     if (file_exists("sound/ambience/realworld.wav")==1)        precache_sound("ambience/realworld.wav")     if (file_exists("models/player/smith/smith.mdl")==1)        precache_model("models/player/smith/smith.mdl")     if (file_exists("models/player/neo/neo.mdl")==1)        precache_model("models/player/neo/neo.mdl")     return PLUGIN_CONTINUE } public check_cvars() {     if (get_cvar_num("matrix_health") > 300) {         server_print("[Matrix] matrix_health can not be greater than 300, setting cvar to 300 now.")         set_cvar_num("matrix_health", 300)     }     if (get_cvar_num("matrix_health") < 100) {         server_print("[Matrix] matrix_health can not be less than 100, setting cvar to 100 now.")         set_cvar_num("matrix_health", 100)     }     if (get_cvar_num("matrix_armor") > 300) {         server_print("[Matrix] matrix_armor can not be greater than 300, setting cvar to 300 now.")         set_cvar_num("matrix_armor", 300)     }     if (get_cvar_num("matrix_armor") < 100) {         server_print("[Matrix] matrix_armor can not be less than 100, setting cvar to 100 now.")         set_cvar_num("matrix_armor", 100)     } }
Attached Files
File Type: sma Get Plugin or Get Source (amx_matrix.sma - 954 views - 11.5 KB)
__________________
Burnzy is offline
Send a message via AIM to Burnzy
karlos
Veteran Member
Join Date: Apr 2004
Location: Germany/Poland
Old 08-05-2004 , 05:29  
Reply With Quote #2

do u get any error ingame? in func change_matrix u check when team 1 if exist neo but wants to set smith
butnether the less u using cs_set_user_model(id,"neo") but it should be cs_set_user_model(id,"player/neo/neo") ( or even with .mdl extension)
__________________
alias White Panther
karlos is offline
BillyTheKid
Senior Member
Join Date: Jun 2004
Old 08-05-2004 , 18:21  
Reply With Quote #3

Burnzy dude take a look man your checking the Access Level! umm which they don't have heheeh. You will either need to open this up to everyone or you will need to make a new public that doesn't check for the access rights take a look i will be home soon and can give you a hand. Till then have fun weeeeeeeeeeeeeeeeeeeee!!!!!!!!!!!!!!!!!!!!!!! !!!!111
BillyTheKid is offline
Send a message via AIM to BillyTheKid
killerelite32
Junior Member
Join Date: Aug 2004
Old 08-06-2004 , 00:22  
Reply With Quote #4

he only has that in the admin part. Burnz ask for this to be locked and moved to that one forum... where stuff gets thrown out
__________________
I have been banned because I spammed on the forums and registered multiple accounts.
killerelite32 is offline
BillyTheKid
Senior Member
Join Date: Jun 2004
Old 08-06-2004 , 11:15  
Reply With Quote #5

yeah I see that now.. Give me some time and I will look at the code better!
BillyTheKid is offline
Send a message via AIM to BillyTheKid
killerelite32
Junior Member
Join Date: Aug 2004
Old 08-06-2004 , 11:22  
Reply With Quote #6

he fixed everything. I think... who was uit that tested, JJkiller? no wait.. john sumthing. He tested it for burnzy and everything got fixed:

Quote:
* Changelog:
* ==========
* v1.99:
* -Made so when unmatrixed, if health or armor is over 100... its set to 100.
* -Now deagle does not have to reload
* -Took out the is_matrix2 thing (i was stupid to add that)
* -Added help menu
* -Fixed it so /matrix and /unmatrix work
* -Fixed file_exist for smith
he told me to post that... no idea though
__________________
I have been banned because I spammed on the forums and registered multiple accounts.
killerelite32 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 11:49.


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