AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Xtra Mod (https://forums.alliedmods.net/showthread.php?t=28207)

Psycho-Path 05-09-2006 16:34

Xtra Mod
 
1 Attachment(s)
Hey guys, I made a plugin a couple months ago and totally forgot about it. I decided to start it up again.

Well there are a couple problems..for example. When I join, I don't want the menu to open until I start the round. Also when I select one of the xtra's the menu stays up until I select another xtra. I know there are more problems but I was wondering if some of the beta testers could put it on their server and tell me what problems you guys see.

Also I would like to make this mod fully customisable so you can change how many levels there are and how much xp you need for each level and how much xp for each kill etc..

And, I need to know how to add levels and not just xp.

Admin command for xp: amx_xtra_addxp <name> <amount to add>

Thanks,
Psycho-Path

[PS: I am really not begging anyone for this coding, I just can't find it. And I'm really not good enough to just get it off the top of my head :D ]

[EDIT: I found some errors in the good old console.]
Quote:

Originally Posted by Good Ol' Console
L 05/09/2006 - 15:35:37: [AMXX] Plugin called message_begin with an invalid message id (0).
L 05/09/2006 - 15:35:37: [AMXX] Displaying debug trace (plugin "xtramod.amxx")
L 05/09/2006 - 15:35:37: [AMXX] Run time error 10: native error (native "message_begin")
L 05/09/2006 - 15:35:37: [AMXX] [0] xtramod3.sma::ShowHUD (line 275)
L 05/09/2006 - 15:35:37: [AMXX] [1] xtramod3.sma::DoChooseXtra (line 224)
L 05/09/2006 - 15:35:41: [AMXX] Plugin called message_begin with an invalid message id (0).
L 05/09/2006 - 15:35:41: [AMXX] Displaying debug trace (plugin "xtramod.amxx")
L 05/09/2006 - 15:35:41: [AMXX] Run time error 10: native error (native "message_begin")
L 05/09/2006 - 15:35:41: [AMXX] [0] xtramod3.sma::ShowHUD (line 275)
L 05/09/2006 - 15:35:41: [AMXX] [1] xtramod3.sma::DoChooseXtra (line 224)

[/EDIT]

SweatyBanana 05-09-2006 16:44

Code:
public ShowHUD(id)     {     new HUD[51]     format(HUD, 50, "[%s]Level: %i XP: %i", CLASSES[PlayerClass[id]], PlayerLevel[id], PlayerXP[id])         message_begin(MSG_ONE, msgtext, {0,0,0}, id)     write_byte(0)     write_string(HUD)     message_end()     return }

Take a look in here...I didnt do anything to it...just look at that section for the native errors ur getting.

FatalisDK 05-10-2006 08:49

Try renaming msgtext to something else.

ThomasNguyen 05-10-2006 08:54

Which mod is this plugin for anyways? and what does it do?

Charming 05-10-2006 09:10

added to my server check for errors later.

Psycho-Path 05-10-2006 13:21

@ SweatyBanana: LOL!! I was really tired when I wrote this..I'm nub as well -.-

@ FatalisDK: Lol kk

@ ThomasNguyen: LOl, this is a mod in its self. I am not basing it on anything.

@ Charming: kk, thanks. Can't wait to hear back from you. :D

[EDIT: Oops Thomas, I forgot to tell you what this mod is about. Well let me just say...it's like a mild wc3.[/EDIT]

ThomasNguyen 05-10-2006 16:36

OIC, Lol, by mod i mean modification i.e : cs, dod, hl etc... and is the whole plugin done and your just looking at errors?

Psycho-Path 05-10-2006 17:22

lol sry, I hadn't understood you before. But it is for counter-strike. No the plugin is done but I would prefer to look at the errors I have right now before adding anything else.

Charming 05-10-2006 17:39

Take Gabenmod out of ur sig :lol: it looks weird.

nightscreem 05-10-2006 18:51

It doesn't know if id is a user or something, so try to add what i have added so you make sure id is a player, helped me a lot:D
change
Code:
public ShowHUD(id)     {     new HUD[51]     format(HUD, 50, "[%s]Level: %i XP: %i", CLASSES[PlayerClass[id]], PlayerLevel[id], PlayerXP[id])         message_begin(MSG_ONE, msgtext, {0,0,0}, id)     write_byte(0)     write_string(HUD)     message_end()     return }
into
Code:
public ShowHUD(id)     {     if( !is_user_connected( id ) {         return PLUGIN_HANDLED     }     new HUD[51]     format(HUD, 50, "[%s]Level: %i XP: %i", CLASSES[PlayerClass[id]], PlayerLevel[id], PlayerXP[id])         message_begin(MSG_ONE, msgtext, {0,0,0}, id)     write_byte(0)     write_string(HUD)     message_end()     return }


All times are GMT -4. The time now is 05:12.

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