Raised This Month: $ Target: $400
 0% 

my pitchblack hero not working please help anyone


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
tinix/robin
Junior Member
Join Date: Nov 2004
Old 11-06-2004 , 18:55   my pitchblack hero not working please help anyone
Reply With Quote #1

please help i put it up so you can see if there are errors

Code:
// PITCH BLACK! /* CVARS - copy and paste to shconfig.cfg pitch_level 0 pitch_time 7                //Ammount of time the darkness lasts pitch_cooldown 60           //Seconds till next available use of power */ //LOADS OF THNX TO FREECODE FOR GETTING THIS WORKING #include <amxmod> #include <Vexd_Utilities> #include <superheromod> // GLOBAL VARIABLES new gHeroName[]="Pitch Black" new gHasPitchPower[SH_MAXSLOTS+1] new PitchTimer[SH_MAXSLOTS+1] new bool:NightVisionUse[SH_MAXSLOTS+1] new bool:lightsOut = false new bool:FirstSpawn = true new NVGToggle, numOfPB = 0 #define TASKID 4552876 //---------------------------------------------------------------------------------------------- public plugin_init() {     // Plugin Info     register_plugin("SUPERHERO Pitch Black","1.2","[FTW]-S.W.A.T")     // DO NOT EDIT THIS FILE TO CHANGE CVARS, USE THE SHCONFIG.CFG     register_cvar("pitch_level", "0" )     register_cvar("pitch_time", "7" )     register_cvar("pitch_cooldown", "60" )     // FIRE THE EVENT TO CREATE THIS SUPERHERO!     shCreateHero(gHeroName, "Total Darkness", "Make everything Pitch Black. Get Riddick's sight.", true, "pitch_level" )     // REGISTER EVENTS THIS HERO WILL RESPOND TO! (AND SERVER COMMANDS)     register_srvcmd("pitch_init", "pitch_init")     shRegHeroInit(gHeroName, "pitch_init")         // KEY DOWN     register_srvcmd("pitch_kd", "pitch_kd")     shRegKeyDown(gHeroName, "pitch_kd")     register_event("ResetHUD","newSpawn","b")     register_event("DeathMsg", "pitch_death", "a")     register_logevent("round_end", 2, "1=Round_End")     register_logevent("round_end", 2, "1&Restart_Round_")     set_task(1.0, "pitch_loop", 0, "", 0, "b")     // NightVision     register_clcmd("nightvision","ToggleNVG")     NVGToggle = get_user_msgid("NVGToggle") } //---------------------------------------------------------------------------------------------- public pitch_init() {     // First Argument is an id     new temp[6]     read_argv(1,temp,5)     new id=str_to_num(temp)     // 2nd Argument is 0 or 1 depending on whether the id has Pitch Black     read_argv(2,temp,5)     new hasPowers = str_to_num(temp)     gHasPitchPower[id] = (hasPowers != 0)     PitchTimer[id] = -1     gPlayerUltimateUsed[id] = false     if (!gHasPitchPower[id] && PitchTimer[id] > 0) {         numOfPB -= 1         StopNVG(id)         if (numOfPB <= 0) {             numOfPB = 0             lightsOn()         }     } } //---------------------------------------------------------------------------------------------- public plugin_precache() {     precache_sound( "items/nvg_on.wav" )     precache_sound( "items/nvg_off.wav" ) } //---------------------------------------------------------------------------------------------- public pitch_kd() {     // First Argument is an id with Pitch Powers!     new temp[6]     read_argv(1,temp,5)     new id = str_to_num(temp)     if ( !is_user_alive(id) || !gHasPitchPower[id]) return PLUGIN_HANDLED     if ( gPlayerUltimateUsed[id] || PitchTimer[id] >= 0) {         playSoundDenySelect(id)         return PLUGIN_HANDLED     }     PitchTimer[id] = get_cvar_num("pitch_time")     ultimateTimer(id, get_cvar_float("pitch_cooldown"))     if (!lightsOut) {         lightsOut = true         #if defined AMXX_VERSION         set_lights("a")         #else         SetLights("a")         #endif     }         StartNVG(id)     numOfPB += 1     return PLUGIN_HANDLED } //---------------------------------------------------------------------------------------------- public round_end() {     FirstSpawn = true } //---------------------------------------------------------------------------------------------- public newSpawn(id) {     gPlayerUltimateUsed[id] = false     PitchTimer[id] = -1         if (NightVisionUse[id]) StopNVG(id)     if (lightsOut && FirstSpawn) {         numOfPB = 0         FirstSpawn = false         lightsOn()     } } //---------------------------------------------------------------------------------------------- public client_disconnect(id) {     PitchTimer[id] = -1     gPlayerUltimateUsed[id] = false     remove_task(id+TASKID)     NightVisionUse[id] = false } //---------------------------------------------------------------------------------------------- public pitch_death() {     new id = read_data(2)     if (PitchTimer[id] > 0) {         PitchTimer[id] = -1         gPlayerUltimateUsed[id] = false         numOfPB -= 1         StopNVG(id)         if (numOfPB <= 0) {             numOfPB = 0             lightsOn()         }     } } //---------------------------------------------------------------------------------------------- public lightsOn() {     lightsOut = false     #if defined AMXX_VERSION     set_lights("#OFF")     #else     SetLights("#OFF")     #endif     new players[SH_MAXSLOTS], player_num, id     get_players(players, player_num, "ac")     for (new i = 0; i < player_num; i++) {         id = players[i]         set_hudmessage(0, 128, 0, -1.0, 0.65, 2, 0.02, 6.0, 0.01, 0.1, 62)         show_hudmessage(id,"Normal Lighting Resotred")         if (NightVisionUse[id]) StopNVG(id)     } } //---------------------------------------------------------------------------------------------- public ToggleNVG(id) {     if ( !shModActive() || !gHasPitchPower[id] || !is_user_alive(id) ) return PLUGIN_CONTINUE     if (NightVisionUse[id])     StopNVG(id)     else                        StartNVG(id)     return PLUGIN_HANDLED } //---------------------------------------------------------------------------------------------- public StartNVG(id) {     if ( !gHasPitchPower[id] || !shModActive() || !is_user_alive(id) ) return     message_begin(MSG_ONE, NVGToggle, {0,0,0}, id)     write_byte( 0 )     message_end()     NightVisionUse[id] = true     emit_sound(id,CHAN_ITEM,"items/nvg_on.wav",VOL_NORM,ATTN_NORM,0,PITCH_NORM)     set_task(0.1,"RunNVG",id+TASKID,"",0,"b") } //---------------------------------------------------------------------------------------------- public StopNVG(id) {     emit_sound(id,CHAN_ITEM,"items/nvg_off.wav",VOL_NORM,ATTN_NORM,0,PITCH_NORM)     remove_task(id+TASKID)     NightVisionUse[id] = false } //---------------------------------------------------------------------------------------------- public RunNVG(id) {     id -= TASKID     if (!is_user_alive(id) || !NightVisionUse[id]) {         StopNVG(id)         return     }     new origin[3]     get_user_origin(id,origin)     //NVG Entity     message_begin(MSG_ONE,SVC_TEMPENTITY,{0,0,0},id)     write_byte(27)          //entity type     write_coord(origin[0])  //x     write_coord(origin[1])  //y     write_coord(origin[2])  //z     write_byte(125)     //visible distance     write_byte(98)          //red     write_byte(0)           //blue     write_byte(76)          //green     write_byte(3)           //deciseconds     write_byte(10)          //distance flicker     message_end()     //Darkens it a little     //setScreenFlash(id, 107, 0, 83, 12, 100) } //---------------------------------------------------------------------------------------------- public pitch_loop() {     if (!lightsOut) return     new players[SH_MAXSLOTS], player_num, id     get_players(players, player_num, "ac")     for (new i = 0; i < player_num; i++) {         if (!lightsOut) return         id = players[i]         if(PitchTimer[id] > 0) {             new message[64]             format(message, 63, "PitchBlack - %d seconds left", PitchTimer[id])             set_hudmessage(255, 255, 255, -1.0, 0.3, 0, 1.0, 1.1, 0.0, 0.0, 4)             show_hudmessage(id, message)             PitchTimer[id]--             continue         }         else if ( PitchTimer[id] == 0 ) {             PitchTimer[id] = -1             numOfPB -= 1             if (numOfPB <= 0) {                 numOfPB = 0                 lightsOn()             }             continue         }         else {             set_hudmessage(255, 255, 255, -1.0, 0.65, 2, 0.02, 2.0, 0.01, 0.1, 62)             show_hudmessage(id,"Pitch Black Mode - Total Darkness")             continue         }     } } //----------------------------------------------------------------------------------------------
__________________
I am 35% addicted to Counterstrike. What about you?
tinix/robin is offline
Send a message via MSN to tinix/robin
MTS Steel DrAgoN
Veteran Member
Join Date: Jul 2004
Location: California
Old 11-06-2004 , 21:17  
Reply With Quote #2

what exactly did you change? or did you change anything at all?
MTS Steel DrAgoN is offline
Send a message via AIM to MTS Steel DrAgoN
Prowler
Senior Member
Join Date: Nov 2004
Old 11-07-2004 , 00:50  
Reply With Quote #3

Is that JTP's bitch black, or an older version, or a custom version?

If older, download the latest one (check jtp's approved heros) if custom tells us what you changed so we can identify the problem
Prowler is offline
vittu
SuperHero Moderator
Join Date: Oct 2004
Location: L.A. County, CA
Old 11-07-2004 , 01:34  
Reply With Quote #4

It's jtp's version...

I compared the code and nothing seemed to be different then the newest version... Something else must be wrong the hero is fine.


what version of amx are you running? make sure you installed the correct version of the hero for it.
Post your results for the server console command: amx plugins
and for: meta list
vittu is offline
Send a message via AIM to vittu Send a message via MSN to vittu Send a message via Yahoo to vittu
tinix/robin
Junior Member
Join Date: Nov 2004
Old 11-07-2004 , 06:51  
Reply With Quote #5

hmmm i didnt change anything thats for sure i dont know scripting/coding..
but it just dont work i got amx mod 9.8 i think or i dont know really , where can i check what version i have ?
tinix/robin is offline
Send a message via MSN to tinix/robin
Prowler
Senior Member
Join Date: Nov 2004
Old 11-07-2004 , 06:57  
Reply With Quote #6

Type Meta list in console should do it

JTPs download comes with 3 versions (amx 9.9 which is just called amx, amx 9.8a wich is called that, amd amxx 0.20 which is called amxx) Perhaps just trying other the other versions to see if it solves your problem?
Prowler is offline
tinix/robin
Junior Member
Join Date: Nov 2004
Old 11-07-2004 , 07:07   works fine thanks to you!! :D
Reply With Quote #7

Now it works fine
thanks guys , i was just taking the amx 9.8 and my version is just amx 9.9 so thanks again
tinix/robin is offline
Send a message via MSN to tinix/robin
Prowler
Senior Member
Join Date: Nov 2004
Old 11-07-2004 , 07:12  
Reply With Quote #8

No problems, just post tech support in tech support not general next time
Prowler is offline
tinix/robin
Junior Member
Join Date: Nov 2004
Old 11-07-2004 , 07:13   Results of meta list and amx plugins
Reply With Quote #9

amx plugin:

Currently loaded plugins:
name version author file status
[ 1] Admin Base 0.9 default admin.amx running
[ 2] Admin Commands 0.9 default admincmd.amx running
[ 3] Admin Help 0.9 tcquest78 adminhelp.amx running
[ 4] Slots Reservation 0.9.7 default adminslots.amx running
[ 5] Menus Front-End 0.9 default menufront.amx running
[ 6] Commands Menu 0.9 default cmdmenu.amx running
[ 7] Players Menu 0.9 default plmenu.amx running
[ 8] Restrict Weapons 0.9.6.1 default restmenu.amx running
[ 9] Maps Menu 0.9 default mapsmenu.amx running
[ 10] Anti Flood 0.9 default antiflood.amx running
[ 11] Admin Chat 0.9 default adminchat.amx running
[ 12] Admin Votes 0.9 default adminvote.amx running
[ 13] NextMap 0.9 default nextmap.amx running
[ 14] TimeLeft 0.9 default timeleft.amx running
[ 15] Nextmap chooser 0.9 default mapchooser.amx running
[ 16] Scrolling Message 0.9 default scrollmsg.amx running
[ 17] Info. Messages 0.9 default imessage.amx running
[ 18] Welcome Message 0.9 default welcomemsg.amx running
[ 19] Stats 0.9 default stats.amx running
[ 20] Stats Logging 0.9 JustinHoMi stats_logging.a running
[ 21] Teleport Menu 0.9 default telemenu.amx running
[ 22] Misc. Stats 0.9 default miscstats.amx running
[ 23] Pause Plugins 0.9 default pausecfg.amx running
[ 24] Stats Configurati 0.9 default statscfg.amx running
[ 25] SuperHero Mod 1.17.5 JTP10181/{HOJ}Ba superheromodvau running
[ 26] SUPERHERO Anubis 1.17.5 AssKicR/JTP10181 sh_anubis.amx running
[ 27] SUPERHERO Pitch B 1.2 [FTW]-S.W.A.T sh_pitchblack.a running
[ 28] SUPERHERO Aquaman 1.17.5 AssKicR/Lazy/JTP sh_aquaman.amx running
[ 29] SUPERHERO Batman 1.17.5 {HOJ} Batman/JTP sh_batman.amx running
[ 30] SUPERHERO Bomberm 1.17.5 AssKicR sh_bomberman.am running
[ 31] SUPERHERO Captain 1.17.5 {HOJ} Batman/JTP sh_captaina.amx running
[ 32] SUPERHERO Cyclops 1.17.5 AssKicR/Batman/J sh_cyclops.amx running
[ 33] SUPERHERO Daredev 1.17.5 {HOJ} Batman/JTP sh_daredevil.am running
[ 34] SUPERHERO Dazzler 1.17.5 {HOJ} Batman sh_dazzler.amx running
[ 35] SUPERHERO Dracula 1.17.5 {HOJ} Batman/JTP sh_dracula.amx running
[ 36] SUPERHERO Flash 1.17.5 {HOJ} Batman sh_flash.amx running
[ 37] SUPERHERO Hobgobl 1.17.5 {HOJ} Batman/JTP sh_hobgoblin.am running
[ 38] SUPERHERO Hulk 1.17.5 {HOJ} Batman sh_hulk.amx running
[ 39] SUPERHERO Human T 1.17.5 {HOJ} Batman/JTP sh_humantorch.a running
[ 40] SUPERHERO Ironman 1.17.5 {HOJ} Batman/JTP sh_ironman.amx running
[ 41] SUPERHERO Magneto 1.17.5 AssKicR / JTP101 sh_magneto.amx running
[ 42] SUPERHERO Mystiqu 1.17.5 {HOJ} Batman sh_mystique.amx running
[ 43] SUPERHERO Nightcr 1.17.5 {HOJ} Batman sh_nightcrawler running
[ 44] SUPERHERO Punishe 1.17.5 {HOJ} Batman sh_punisher.amx running
[ 45] SUPERHERO Skeleto 1.17.5 {HOJ} Batman sh_skeletor.amx running
[ 46] SUPERHERO Spiderm 1.17.5 {HOJ} Batman/JTP sh_spiderman.am running
[ 47] SUPERHERO Superma 1.17.5 {HOJ} Batman sh_superman.amx running
[ 48] SUPERHERO Kamakaz 1.14.4 AssKicR sh_unabomber.am running
[ 49] SUPERHERO Wind Wa 1.17.5 AssKicR/JTP10181 sh_windwalker.a running
[ 50] SUPERHERO Wolveri 1.17.5 {HOJ}Batman/JTP1 sh_wolverine.am running
[ 51] SUPERHERO Xavier 1.17.5 {HOJ} Batman sh_xavier.amx running
[ 52] SUPERHERO Zeus 1.17.5 {HOJ} Batman/JTP sh_zeus.amx running
[ 53] Toad (X-Men) 0.1 tix sh_xtoad.amx running
[ 54] SUPERHERO The Inv 1.0 AssKicR sh_invisman.amx running
[ 55] SUPERHERO PROBE 0.9 RuXi sh_probe.amx running
[ 56] SUPERHERO THE ROC 1.0 Freecode sh_rock.amx running
[ 57] unknown unknown unknown sh_phasing.amx bad load
[ 58] SUPERHERO Megaman 1.14.4 NOOBology Madski sh_megaman.amx running
[ 59] SUPERHERO Goten 1.0 buttface sh_goten.amx running
[ 60] SUPERHERO Goku 1.14.4 Mr Sparkle sh_goku.amx running
[ 61] SUPERHERO Cola Lo 1.0 Dr Dream sh_cola.amx running
61 plugins, 60 running

meta list:
] meta list
Currently loaded plugins:
description stat pend file vers src load unlod
[ 1] AMX RUN - amx_mm.dll v0.9.7 ini ANY ANY
[ 2] Monster RUN - monster_mm.dll v3.01.04 ini Chlvl Chlvl
[ 3] YaPB RUN - podbot.dll v1.0 ini Start Never
[ 4] STATSME RUN - statsme_mm.dll v2.8.2 ini Chlvl Chlvl
[ 5] CS STATS RUN - csstats_mm.dll v0.9.7 ( cmd ANY ANY
[ 6] FUN RUN - fun_mm.dll v0.9.8 cmd ANY ANY
[ 7] XtraFun RUN - xtrafun_mm.dll v1.2 cmd ANY Pause
[ 8] Vexd Util. Modu RUN - vexdum_mm.dll v0.2.0.7 cmd ANY ANY
8 plugins, 8 running
L 11/07/2004 - 13:11:15: "*ScandinaviA*majs<3><BOT><
tinix/robin is offline
Send a message via MSN to tinix/robin
tinix/robin
Junior Member
Join Date: Nov 2004
Old 11-07-2004 , 07:17  
Reply With Quote #10

ok hehe cya guys ;D
tinix/robin is offline
Send a message via MSN to tinix/robin
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 01:55.


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