|
AMX Mod X Moderator
|

10-20-2009
, 12:44
Re: Proofreading
|
#2
|
Quote:
Originally Posted by OneMoreLevel
First of thanks alot, It must have tooken quite awhile to do that.
About indenting, when I press Ctrl-I in the compiler, it just brings the code to look like that, and when I indent by myself, it gives me some warnings.
|
Use tab instead of spaces.
Quote:
Originally Posted by OneMoreLevel
Please do, Im still quite a newb at this.
|
PHP Code:
enum MODES { WM = 0, JF, SB, ST, AH, RO, SS }
new Float:gSpeeds[_:MODES] = { 300.0, 400.0, 350.0, 250.0, 300.0, 325.0, 275.0 }
new gHealths[_:MODES] = { 200, 175, 175, 255, 150, 175, 200 }
new gNames[_:MODES][] = { "War Machine", "Jet Fighter", "Stealth Bomber", "Scorpion Tank", "Apache Helicopter", "Railgun Operator", "Submarine Seeker" }
// ...
client_print( id, print_chat, "[AMX] You are now a %s. Type /classinfo for information.", gNames[item] ) set_user_maxspeed( id, gSpeeds[item] ) set_user_health( id, gHealths[item] )
// ... switch ( item ) { case JF : set_user_rendering( id, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 185 ) case SB : { set_user_rendering( id, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 65 ) cs_set_user_bpammo( id, CSW_HEGRENADE, 5 ) } case SS : set_user_rendering( id, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 130 ) }
That's a generalized solution to what you were asking.
Quote:
Originally Posted by OneMoreLevel
Im also Quite confused with this one, I know what you mean by creating it in plugin_init, but I dont understand the storing it globally part.
|
PHP Code:
new gMenu
public plugin_init() gMenu = menu_create( "whatever", "who cares" )
// ... menu_display( id, gMenu )
// ...
public plugin_end() menu_destroy( gMenu )
__________________
|
|