Merhabalar, böyle bir hata alıyorum.
//cstrike/addons/amxmodx/scripting/ss.sma(71) : error 017: undefined symbol "hudhandler"
//cstrike/addons/amxmodx/scripting/ss.sma(71) : warning 215: expression has no effect
//cstrike/addons/amxmodx/scripting/ss.sma(71) : warning 215: expression has no effect
//cstrike/addons/amxmodx/scripting/ss.sma(71) : error 001: expected token: ";", but found ")"
//cstrike/addons/amxmodx/scripting/ss.sma(71) : error 029: invalid expression, assumed zero
//cstrike/addons/amxmodx/scripting/ss.sma(71) : fatal error 107: too many error messages on one line
Compilation aborted.
4 Errors.
Done.
yardımcı olurmusunuz ?
http://dosya.co/ljfudnqolayf/ss.sma.html
Gün Map Plugini Sıkıntısı
Moderatör: Moderatörler
-
Konu Sahibi - Mesajlar: 19
- Kayıt: Pzr Haz 12, 2016 4:42 pm
-
- Mesajlar: 141
- Kayıt: Cum Oca 29, 2016 12:48 am
- Server Ip/DNS: cs12.csduragi.com
Gün Map Plugini Sıkıntısı
Kod: Tümünü seç
#include <amxmodx>
#include <amxmisc>
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <hamsandwich>
#include <fakemeta>
#include <engine>
#include <fakemeta_util>
#include <hamsandwich>
#define PLUGIN "Gun Plugini"
#define VERSION "1.2"
#define AUTHOR "Mlhcnshn"
#define SELECTMAPS 5
#define charsof(%1) (sizeof(%1)-1)
new gunsayisi,oylama;
new Array:g_mapName;
new g_mapNums;
new g_nextName[SELECTMAPS]
new g_voteCount[SELECTMAPS + 2]
new g_mapVoteNum
new g_lastMap[25]
new g_coloredMenus
new bool:g_selected = false
new hudhandler
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
hudhandler = CreateHudSyncObj()
g_mapName=ArrayCreate(32);
new MenuName[64]
format(MenuName, 63, "\d|\reXpert bReak\d| \w~ \yMap \yMenu")
register_menucmd(register_menuid(MenuName), (-1^(-1<<(SELECTMAPS+2))), "countVote")
get_localinfo("lastMap", g_lastMap, 25)
set_localinfo("lastMap", "")
new maps_ini_file[64]
get_configsdir(maps_ini_file, 63);
format(maps_ini_file, 63, "%s/maps.ini", maps_ini_file);
if (!file_exists(maps_ini_file))
get_cvar_string("mapcyclefile", maps_ini_file, 63)
g_coloredMenus = colored_menus()
gunsayisi = 1;
register_event("TextMsg", "RoundRes", "a", "2=#Game_will_restart_in")
register_event("HLTV", "YeniRound", "a", "1=0", "2=0")
register_logevent("round_end", 2, "1=Round_End")
oylama = register_cvar("map_oyla_gun", "20");
set_task(1.0,"guncelle",.flags="b");
}
public guncelle(id)
{
set_hudmessage(255, 255, 0, 0.01, 0.18, 0, 6.0, 5.0)
ShowSyncHudMsg(0,hudhandler,"Hapis Gun Sayisi: [ %d / 20 ]",gunsayisi)
}
public round_end()
{
gunsayisi++
}
public checkVotes()
{
new b = 0
for (new a = 0; a < g_mapVoteNum; ++a)
if (g_voteCount[b] < g_voteCount[a])
b = a
new smap[32]
if (g_voteCount[b] && g_voteCount[SELECTMAPS + 1] <= g_voteCount[b])
{
ArrayGetString(g_mapName, g_nextName[b], smap, charsof(smap));
set_cvar_string("amx_nextmap", smap);
client_print2(0, "!n[!teXpert bReak Gaming!n] !n[!t%s!n] !gMap oylamasi bitti. Secilen Map !n[!t%s!n]..", smap)
log_amx("Map Oylamasi: Map Oylamasi Bitti. Secilen Map: %s", smap)
set_task(3.0,"degis");
}else
{
client_print2(0, "!n[!teXpert bReak Gaming!n] !gOylama 3sn. icinde yeniden baslayacaktir..")
g_selected = false
set_task(3.0,"Oyla");
}
}
public degis()
{
new smap[32];
get_cvar_string("amx_nextmap", smap, 31)
server_cmd("changelevel %s",smap)
}
public countVote(id, key)
{
if (get_cvar_float("amx_vote_answers"))
{
new name[32]
get_user_name(id, name, 31)
if (key == SELECTMAPS)
client_print2(0, "!n[!teXpert bReak Gaming!n] !n[!t%s!n] !gisimli oyuncu sure uzatmayi secti..", name)
else if (key < SELECTMAPS)
{
new map[32];
ArrayGetString(g_mapName, g_nextName[key], map, charsof(map));
client_print2(0, "!n[!teXpert bReak Gaming!n] !n[!t%s!n] !gisimli oyuncunun sectigi map !n[!t%s!n]..", name, map);
}
}
++g_voteCount[key]
return PLUGIN_HANDLED
}
bool:isInMenu(id)
{
for (new a = 0; a < g_mapVoteNum; ++a)
if (id == g_nextName[a])
return true
return false
}
public voteNextmap()
{
if (g_selected)
return
g_selected = true
new menu[512], a, mkeys = (1<<SELECTMAPS + 1)
new pos = format(menu, 511, g_coloredMenus ? "\d|\reXpert bReak\d| \w~ \yMap \ySecimi^n^n" : "|eXpert bReak| Map Secimi^n^n")
new dmax = (g_mapNums > SELECTMAPS) ? SELECTMAPS : g_mapNums
for (g_mapVoteNum = 0; g_mapVoteNum < dmax; ++g_mapVoteNum)
{
a = random_num(0, g_mapNums - 1)
while (isInMenu(a))
if (++a >= g_mapNums) a = 0
g_nextName[g_mapVoteNum] = a
pos += format(menu[pos], 511, "%d. %a^n", g_mapVoteNum + 1, ArrayGetStringHandle(g_mapName, a));
mkeys |= (1<<g_mapVoteNum)
g_voteCount[g_mapVoteNum] = 0
}
menu[pos++] = '^n'
g_voteCount[SELECTMAPS] = 0
g_voteCount[SELECTMAPS + 1] = 0
new mapname[32]
get_mapname(mapname, 31)
new MenuName[64]
format(MenuName, 63, "\d|\reXpert bReak\d| \w~ \yMap \ySecimi")
show_menu(0, mkeys, menu, 15, MenuName)
set_task(15.0, "checkVotes")
client_print2(0, "!n[!teXpert bReak Gaming!n] !gBir sonraki map oylamasi baslatildi..")
client_cmd(0, "spk Gman/Gman_Choose2")
log_amx("Map Oylamasi: Bir Sonraki Map Oylamasi Baslatildi.")
}
public Oyla()
{
new maps_ini_file[64]
get_configsdir(maps_ini_file, 63);
format(maps_ini_file, 63, "%s/maps.ini", maps_ini_file);
if (loadSettings(maps_ini_file))
voteNextmap();
}
stock bool:ValidMap(mapname[])
{
if ( is_map_valid(mapname) )
{
return true;
}
new len = strlen(mapname) - 4;
if (len < 0)
{
return false;
}
if ( equali(mapname[len], ".bsp") )
{
mapname[len] = '^0';
if ( is_map_valid(mapname) )
{
return true;
}
}
return false;
}
loadSettings(filename[])
{
if (!file_exists(filename))
return 0
new szText[32]
new currentMap[32]
new buff[256];
get_mapname(currentMap, 25)
new fp=fopen(filename,"r");
while (!feof(fp))
{
buff[0]='^0';
szText[0]='^0';
fgets(fp, buff, charsof(buff));
parse(buff, szText, charsof(szText));
if (szText[0] != ';' &&
ValidMap(szText) &&
!equali(szText, g_lastMap) &&
!equali(szText, currentMap))
{
ArrayPushString(g_mapName, szText);
++g_mapNums;
}
}
fclose(fp);
return g_mapNums
}
public RoundRes() {
gunsayisi = 0;
}
public YeniRound() {
if(gunsayisi == get_pcvar_num(oylama))
{
new maps_ini_file[64]
get_configsdir(maps_ini_file, 63);
format(maps_ini_file, 63, "%s/maps.ini", maps_ini_file);
if (loadSettings(maps_ini_file))
set_task(10.0,"voteNextmap");
client_print2(0, "!n[!teXpert bReak Gaming!n] !g10sn. sonra map oylamasi baslayacaktir..")
}
}
public plugin_end()
{
new current_map[25]
get_mapname(current_map, 25)
set_localinfo("lastMap", current_map)
}
stock client_print2(const id, const input[], any:...) {
new count = 1, players[32]
static msg[191]
vformat(msg, 190, input, 3)
replace_all(msg, 190, "!g", "^4")
replace_all(msg, 190, "!n", "^1")
replace_all(msg, 190, "!t", "^3")
if (id) players[0] = id; else get_players(players, count, "ch")
{
for (new i = 0; i < count; i++)
{
if (is_user_connected(players[i]))
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
write_byte(players[i]);
write_string(msg);
message_end();
}
}
}
}
Link: | |
Linklerini gizle |