AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [HELP]pls help me with this problem!!! (https://forums.alliedmods.net/showthread.php?t=120390)

MeloN1997 03-04-2010 10:30

[HELP]pls help me with this problem!!!
 
guys i have realy problem:cry:.
i have make one.sma with this code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>

#define PLUGIN "SkinChanger"
#define VERSION "1.0"
#define AUTHOR "Melon1997"

//--------------------------------------------------------------------------------------------------
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)

register_clcmd("say /models", "action_menu")

register_clcmd("say_team /models", "models_menu")

register_menucmd(register_menuid("Models Menu"),1023,"action_menu")

register_concmd("skinc", "skinconoff", ADMIN_BAN, "<0|1> Disable/Enable Skinchanger")
}
//--------------------------------------------------------------------------------------------------
public action_menu(id,key)
{
return PLUGIN_HANDLED

switch(action_menu) {
case 1: cs_set_user_model(id, "urban")
case 2: cs_set_user_model(id, "gsg9")
case 3: cs_set_user_model(id, "sas")
case 4: cs_set_user_model(id, "gign")
case 5: cs_set_user_model(id, "terror")
case 6: cs_set_user_model(id, "leet")
case 7: cs_set_user_model(id, "arctic")
case 8: cs_set_user_model(id, "guerilla")
case 10: return PLUGIN_HANDLED
default:{
models_menu(id)
return PLUGIN_HANDLED
}
}

cs_get_user_model(id, player_model[id], 20)

return PLUGIN_HANDLED
}
//--------------------------------------------------------------------------------------------------
public models_menu(id)
{
return PLUGIN_HANDLED
}

cs_get_user_model(id, player_model[id], 20)

new menu_body[320]
new n = 0
new len = 319

n += format( menu_body[n],len-n,"\yModels Menu:^n^n\w")

if ( equal(player_model[id], "urban") ) {
n += format( menu_body[n],len-n,"\r1. Urban^n\w")
}
else {
n += format( menu_body[n],len-n,"1. Urban^n")
}

if ( equal(player_model[id], "gsg9") ) {
n += format( menu_body[n],len-n,"\r2. Gsg9^n\w")
}
else {
n += format( menu_body[n],len-n,"2. Gsg9^n")
}

if ( equal(player_model[id], "sas") ) {
n += format( menu_body[n],len-n,"\r3. Sas^n\w")
}
else {
n += format( menu_body[n],len-n,"3. Sas^n")
}

if ( equal(player_model[id], "gign") ) {
n += format( menu_body[n],len-n,"\r4. Gign^n\w")
}
else {
n += format( menu_body[n],len-n,"4. Gign^n")
}

if ( equal(player_model[id], "terror") ) {
n += format( menu_body[n],len-n,"\r5. Terror^n\w")
}
else {
n += format( menu_body[n],len-n,"5. Terror^n")
}

if ( equal(player_model[id], "leet") ) {
n += format( menu_body[n],len-n,"\r6. Leet^n\w")
}
else {
n += format( menu_body[n],len-n,"6. Leet^n")
}

if ( equal(player_model[id], "arctic") ) {
n += format( menu_body[n],len-n,"\r7. Arctic^n\w")
}
else {
n += format( menu_body[n],len-n,"7. Arctic^n")
}

if ( equal(player_model[id], "guerilla") ) {
n += format( menu_body[n],len-n,"\r8. Guerilla^n\w")
}
else {
n += format( menu_body[n],len-n,"8. Guerilla^n")
}

n += format( menu_body[n],len-n,"\y^n0. Exit")

new keys = (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5)|(1< <6)|(1<<7)|(1<<9)

show_menu(id,keys,menu_body)
return PLUGIN_HANDLED
}
//--------------------------------------------------------------------------------------------------
select_model(id) {
cs_set_user_team(id, CS_TEAM_T, CS_T_TERROR)
}
//--------------------------------------------------------------------------------------------------
and i go at one site and his got this errors:
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

SkinChanger.sma(14) : warning 217: loose indentation
SkinChanger.sma(27) : warning 225: unreachable code
SkinChanger.sma(27) : warning 217: loose indentation
SkinChanger.sma(27) : error 076: syntax error in the expression, or invalid function call
SkinChanger.sma(43) : error 017: undefined symbol "player_model"
SkinChanger.sma(43) : warning 215: expression has no effect
SkinChanger.sma(43) : error 001: expected token: ";", but found "]"
SkinChanger.sma(43) : error 029: invalid expression, assumed zero
SkinChanger.sma(43) : fatal error 107: too many error messages on one line

Compilation aborted.
5 Errors.
Done.
what can i do?????????


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

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