Here is my code :
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
public plugin_init() {
register_plugin("Custom Vip Model","1.0"," The Gaming Guy")
register_event("ResetHUD", "resetModel", "b")
}
public current_model(id) {
new de_dust[8] = "de_dust"
new map[33]
new de_dust2[9] = "de_dust2"
get_mapname(map,32)
}
public model(id){
if (strcmp ( map , de_dust ) ) {
public plugin_precache(id) {
precache_model("models/player/de_dust/vip_ct/adm_ct.mdl")
precache_model("models/player/de_dust/vip_te/adm_te.mdl")
return PLUGIN_CONTINUE
}
public resetModel(id, level, cid) {
if (get_user_flags(id) & ADMIN_KICK) {
cs_reset_user_model(id)
new CsTeams:userTeam = cs_get_user_team(id)
if (userTeam == CS_TEAM_T) {
///cs_set_user_model(id, "foldername_te")
cs_set_user_model(id, "de_dust/vip_te")
}
else if(userTeam == CS_TEAM_CT) {
///cs_set_user_model(id, "foldername_ct")
cs_set_user_model(id, "de_dust/vip_ct")
}
}
else if (strcmp(map ,de_dust2) {
public plugin_precache() {
precache_model("models/player/de_dust2/vip_ct/adm_ct.mdl")
precache_model("models/player/de_dust2/vip_te/adm_te.mdl")
return PLUGIN_CONTINUE
public resetModel(id, level, cid) {
if (get_user_flags(id) & ADMIN_KICK) {
cs_reset_user_model(id)
new CsTeams:userTeam = cs_get_user_team(id)
if (userTeam == CS_TEAM_T) {
///cs_set_user_model(id, "foldername_te")
cs_set_user_model(id, "de_dust2/vip_te")
}
else if(userTeam == CS_TEAM_CT) {
///cs_set_user_model(id, "foldername_ct")
cs_set_user_model(id, "de_dust2/vip_ct")
}
}
}
return PLUGIN_CONTINUE
}
}
return PLUGIN_CONTINUE
}
What I am trying to do is to create a plugin to change models per map change. In the above eample I have added two maps (de_dust , de_dust2) But I get errors :
PHP Code:
Welcome to the AMX Mod X 1.76-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team
Warning: Symbol is assigned a value that is never used: "de_dust2" on line 15
Warning: Symbol is assigned a value that is never used: "de_dust" on line 15
Error: Undefined symbol "map" on line 17
Error: Invalid expression, assumed zero on line 19
Error: Function "plugin_precache" is not implemented on line 19
Warning: Unreachable code on line 25
Warning: Loose indentation on line 25
Error: Invalid expression, assumed zero on line 25
Error: Undefined symbol "resetModel" on line 25
Error: Undefined symbol "cid" on line 25
Error: Too many error messages on one line on line 25
Compilation aborted.
7 Errors.
Could not locate output file C:\Users\kdubey\Desktop\Untitled.amx (compile failed).
Please help !