Ich wollt n Menü damit erstellen :
http://sniperbeamer.amxmod.info/menumaker/index_de.htm
Ich krieg aber nen Fehler beim compilieren
Code:
/* AMX Mod script.
*
* (c) 2005, snipA
* This file is provided as is (no warranties).
*
* Generiert mit dem AMX MenuMaker v1.5 (http://sniperbeamer.amxmod.info)
*/
#include <amxmod>
#include <amxmisc>
new bool:cstrike_running
public plugin_init()
{
register_plugin("tpf_weaponmenu","0.1","snipA")
register_menucmd(register_menuid("WeaponArenaVote"),1023,"actionMenu")
register_clcmd("tpf_weaponmenu","showMenu",0)
new modName[32]
get_modname(modName,31)
cstrike_running = equal(modName,"cstrike") ? true : false
}
public actionMenu(id,key)
{
switch(key){
case 0:{
client_cmd(0,"tpf_weaponvote_21")
}
case 1:{
client_cmd(0,"tpf_weaponvote_22")
}
case 2:{
client_cmd(0,"tpf_weaponvote_31")
}
case 3:{
client_cmd(0,"tpf_weaponvote_41")
}
case 4:{
client_cmd(0,"tpf_weaponvote_43")
}
case 5:{
client_cmd(0,"tpf_weaponvote_42")
}
case 6:{
client_cmd(0,"tpf_weaponvote_44")
}
case 7:{
client_cmd(0,"tpf_weaponvote_45")
}
case 8:{
client_cmd(0,"tpf_weaponvote_46")
}
case 9:{
client_cmd(0,"tpf_weaponvote_51")
}
}
return PLUGIN_HANDLED
}
public showMenu(id,level,cid)
{
if (!cmd_access(id,level,cid,1)) return PLUGIN_HANDLED
new menuBody[512]
new len = format(menuBody,511,cstrike_running ? "\yWeaponArenaVote\R^n^n\w" : "WeaponArenaVote^n^n")
len += format(menuBody[len],511-len,"1. Shotgun M3^n2. Shotgun xm1014^n3. MP5^n4. AK47^n5. M4a1^n6. Sig^n7. Aug^n8. Scout^n9. AWP^n^n0. Machine Gun")
show_menu(id,((1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5)|(1<<6)|(1<<7)|(1<<8)|(1<<9)),menuBody)
return PLUGIN_HANDLED
}
Hier der Fehler :
Code:
Welcome to the AMX Mod X 1.00-251 Compiler.
Copyright (c) 1997-2004 ITB CompuPhase, AMX Mod X Team
/home/groups/amxmodx/tmp/phpJ3CdSc.sma(12) : error 021: symbol already defined: "cstrike_running"
/home/groups/amxmodx/tmp/phpJ3CdSc.sma(23) : error 029: invalid expression, assumed zero
/home/groups/amxmodx/tmp/phpJ3CdSc.sma(69) : error 076: syntax error in the expression, or invalid function call
3 Errors.
Could not locate output file /home/users/amxmodx/public_html/websc/phpJ3CdSc.amx (compile failed).
Was muss ich also da ändern? thx 4 answer