Raised This Month: $ Target: $400
 0% 

Gladiator Mod v1.3


Post New Thread Reply   
 
Thread Tools Display Modes
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-07-2010 , 18:06   Re: Gladiator Mod v1.0
Reply With Quote #11

I would put retreiving of cvar values in plugin_cfg() personally so that other configs are executed before you retrieve the value.

EDIT: Ok, so I tested some things. I created a cvar in one plugin and tried retrieving the pointer in another (both in plugin_init and in plugin_cfg). The cvar did not exist in plugin_init when first starting the server. After that it existed in both. FYI.

Therefore any get_pcvar_*() functions will send an error when used for a non-existant cvar.

Also, in my test it seems that amxx.cfg and server.cfg were executed after plugin_cfg() which seems strange to me intuitively.

EDIT2: Just tried it with mp_friendlyfire and is always 0 when you first start the server (cause by my last statement above). That sucks. Wish there was a forward executed after all native .cfg files were executed.

EDIT3: There is no public function named "ResetHUD". You should be seeing errors because of this.
__________________

Last edited by fysiks; 11-07-2010 at 18:26.
fysiks is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-07-2010 , 20:23   Re: Gladiator Mod v1.0
Reply With Quote #12

  • Use cmd_access(), else use console_print(id, ...) instead of if(id){ client_print(id, print_console, ...) }
  • Not critical but: case 10,9,8,7,6,5,4,3,2,1 case 1..10 for readaibility
  • cache values that are retrieved from a native more than once in the same function (might be eliminated by next suggestion)

  • PHP Code:
    if(g_GP[id] >= get_pcvar_num(cvar_hpcost))
    {
        
    // code
    }
    else if(
    g_GP[id] < get_pcvar_num(cvar_hpcost))
    {
        
    // code

    situations like this are redundant as these two cases are mutually exclusive. Change the else if() to just else. I saw at least 6 places that use this. I would probably use the < as the conditional instead of >= (difference is probably negligible)
__________________
fysiks is offline
Metinukas
Junior Member
Join Date: Aug 2009
Location: Lithuanian Kaunas
Old 11-08-2010 , 03:35   Re: Gladiator Mod v1.0
Reply With Quote #13

Foto ?
__________________
Metinukas is offline
Send a message via Skype™ to Metinukas
xLeoNNN
Veteran Member
Join Date: Sep 2010
Location: de_dust2
Old 11-08-2010 , 13:27   Re: Gladiator Mod v1.0
Reply With Quote #14

Quote:
Originally Posted by fysiks View Post
  • Use cmd_access(), else use console_print(id, ...) instead of if(id){ client_print(id, print_console, ...) }
  • Not critical but: case 10,9,8,7,6,5,4,3,2,1 case 1..10 for readaibility
  • cache values that are retrieved from a native more than once in the same function (might be eliminated by next suggestion)

  • PHP Code:
    if(g_GP[id] >= get_pcvar_num(cvar_hpcost))
    {
        
    // code
    }
    else if(
    g_GP[id] < get_pcvar_num(cvar_hpcost))
    {
        
    // code

    situations like this are redundant as these two cases are mutually exclusive. Change the else if() to just else. I saw at least 6 places that use this. I would probably use the < as the conditional instead of >= (difference is probably negligible)
yes, then edit it, I had escaped jajaja.

then makes a video on how

sorry for my bad English, use translator
__________________
xLeoNNN is offline
Send a message via MSN to xLeoNNN
Leon_12
Senior Member
Join Date: Jul 2010
Location: Bulgaria
Old 11-08-2010 , 13:58   Re: Gladiator Mod v1.0
Reply With Quote #15

nice plugin 4/5
Leon_12 is offline
Send a message via Skype™ to Leon_12
xLeoNNN
Veteran Member
Join Date: Sep 2010
Location: de_dust2
Old 11-08-2010 , 14:10   Re: Gladiator Mod v1.0
Reply With Quote #16

thanks. What that miss to be 5 / 5

Last edited by xLeoNNN; 02-14-2011 at 21:02.
xLeoNNN is offline
Send a message via MSN to xLeoNNN
Javivi
AlliedModders Donor
Join Date: Dec 2008
Old 11-08-2010 , 14:29   Re: Gladiator Mod v1.0
Reply With Quote #17

Quote:
Originally Posted by xLeoNNN View Post
thanks. What that miss to be 5 / 5?
Fixed.
__________________
Javivi is offline
Leon_12
Senior Member
Join Date: Jul 2010
Location: Bulgaria
Old 11-08-2010 , 15:18   Re: Gladiator Mod v1.0
Reply With Quote #18

i think plugin will be 5/5 when someone make ARENA maps ;) it will be a lot of fun
Leon_12 is offline
Send a message via Skype™ to Leon_12
Melisko
Senior Member
Join Date: Feb 2010
Old 11-08-2010 , 16:15   Re: Gladiator Mod v1.0
Reply With Quote #19

Quote:
Originally Posted by Leon_12 View Post
i think plugin will be 5/5 when someone make ARENA maps ;) it will be a lot of fun
Stupid ...banana deleted all arena maps... sux -.-
Melisko is offline
xLeoNNNN
BANNED
Join Date: Nov 2010
Location: de_dust2
Old 11-10-2010 , 02:27   Re: Gladiator Mod v1.0
Reply With Quote #20

delete this thread, I will not update
xLeoNNNN 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 20:08.


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