AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Define PlayerClass (https://forums.alliedmods.net/showthread.php?t=104859)

DoviuX 09-28-2009 10:39

Define PlayerClass
 
How can i define this:

PHP Code:

if (g_zombie[id] && PlayerClass[id] == 0

That if this class in game it show that this class is hunter ? Like:

Health: 600 | Class: Hunter . like this? :

PHP Code:

ShowSyncHudMsg(idg_hudsync "Health: %d | Class: %d"healthPlayerClass

if no can you help me to define it heres error when i compile without
PHP Code:

ShowSyncHudMsg(idg_hudsync "Health: %d | Class: %d"healthPlayerClass

.

Code:

//AMXXPC compile.exe
// by the AMX Mod X Dev Team


//// zombie_swarm(2).sma
// D:\Dovydo\Counter - strike Failai\Addonai\L4DPlague\L4DPlague\addons\amxmodx\
scripting\zombie_swarm(2).sma(571) : error 017: undefined symbol "PlayerClass"
// D:\Dovydo\Counter - strike Failai\Addonai\L4DPlague\L4DPlague\addons\amxmodx\
scripting\zombie_swarm(2).sma(571) : warning 215: expression has no effect
// D:\Dovydo\Counter - strike Failai\Addonai\L4DPlague\L4DPlague\addons\amxmodx\
scripting\zombie_swarm(2).sma(571) : error 001: expected token: ";", but found "
]"
// D:\Dovydo\Counter - strike Failai\Addonai\L4DPlague\L4DPlague\addons\amxmodx\
scripting\zombie_swarm(2).sma(571) : error 029: invalid expression, assumed zero

// D:\Dovydo\Counter - strike Failai\Addonai\L4DPlague\L4DPlague\addons\amxmodx\
scripting\zombie_swarm(2).sma(571) : fatal error 107: too many error messages on
 one line
//
// Compilation aborted.
// 4 Errors.
// Could not locate output file D:\Dovydo\Counter - strike Failai\Addonai\L4DPla
gue\L4DPlague\addons\amxmodx\scripting\compiled\zombie_swarm(2).amx (compile fai
led).
//
// Compilation Time: 0,31 sec
// ----------------------------------------

Press enter to exit ...


~Ice*shOt 11-10-2009 10:51

Re: Define PlayerClass
 
make Class: %s - not %d. And
PHP Code:

new PlayerClass[33


Nextra 11-11-2009 15:20

Re: Define PlayerClass
 
PHP Code:

new const classnames[][] =
{
   
"Hunter",
   
"Whatever"
}

//...

client_printidprint_chat"Your Class: %s"classnames[PlayerClass[id]] 



All times are GMT -4. The time now is 22:38.

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