Veteran Member
Join Date: Oct 2013
Location: Macedonia
|
10-20-2017
, 08:38
Re: [HELP]This Plugin Is Not Compiling
|
#2
|
It's missing an "if" after the "else" on line 88. Then you'll get 1000 more errors because of missing brackets all over the place. Even if you compile it by using the fixed code down below, you will see that the guy who made this plugin had no idea what he is doing, and he has been struggling to make it work all the way up to version 7.0, at which he failed miserably.
PHP Code:
/* Sublime AMXX Editor v2.2 */
#include <amxmodx> #include <amxmisc> #include <csx> #include <geoip>
#define PLUGIN "Welcome Plugin Ver. 7.0" #define VERSION "7.0" #define AUTHOR "Author"
new g_svname[] = "`3nf" new hostname[] = "`3nf Pub Server" new szFull[] = "FULL" new szNormal[] = "NORMAL" new szImn[] = "Immunity" new szOwner[] = "OWNER" new szCore[] = "CORE"
new szName[32] new ip[16] new szCountry[46], szCity[21] new AuthId[65]
public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) }
public client_putinserver(id) { set_task(6.0, "welcome") }
public welcome(id) { if (!is_user_admin(id)) { if (access(id, ADMIN_BAN)) { get_user_ip(id, ip, charsmax(ip)); get_user_name(id, szName, charsmax(szName)); get_user_authid(id, AuthId, charsmax(AuthId)) geoip_country_ex(ip, szCountry, charsmax(szCountry)) geoip_city(ip, szCity, charsmax(szCity))
set_hudmessage(0, 42, 255, 0.03, 0.15, 1, 6.0, 12.0) show_hudmessage(0, "=-{***%s ADMIN***}-=^n-------------------------------------- ^nName: %s ^nSteam ID: %s ^nIP: %s ^nADMIN LEVEL: %s ^n Location: %s, %s ^n-------------------------------------- ",g_svname, szName, AuthId, ip, szFull, szCity, szCountry) chatcolor(id, "!tWELCOME !yTO !g%s", hostname) } else if (access(id, ADMIN_LEVEL_A)) { get_user_ip(id, ip, charsmax(ip)); get_user_name(id, szName, charsmax(szName)); get_user_authid(id, AuthId, charsmax(AuthId)) geoip_country_ex(ip, szCountry, charsmax(szCountry)) geoip_city(ip, szCity, charsmax(szCity))
set_hudmessage(0, 42, 255, 0.03, 0.15, 1, 6.0, 12.0) show_hudmessage(0, "=-{***%s ADMIN***}-=^n-------------------------------------- ^nName: %s ^nSteam ID: %s ^nIP: %s ^nADMIN LEVEL: %s ^n Location: %s, %s ^n-------------------------------------- ",g_svname, szName, AuthId, ip, szNormal, szCity, szCountry) chatcolor(id, "!tWELCOME !yTO !g%s", hostname) } else if (access(id, ADMIN_IMMUNITY)) { get_user_ip(id, ip, charsmax(ip)); get_user_name(id, szName, charsmax(szName)); get_user_authid(id, AuthId, charsmax(AuthId)) geoip_country_ex(ip, szCountry, charsmax(szCountry)) geoip_city(ip, szCity, charsmax(szCity))
set_hudmessage(0, 42, 255, 0.03, 0.15, 1, 6.0, 12.0) show_hudmessage(0, "=-{***%s ADMIN***}-=^n-------------------------------------- ^nName: %s ^nSteam ID: %s ^nIP: %s ^nADMIN LEVEL: %s ^n Location: %s, %s ^n-------------------------------------- ",g_svname, szName, AuthId, ip, szImn, szCity, szCountry) chatcolor(id, "!tWELCOME !yTO !g%s", hostname) } else if (access(id, ADMIN_RCON)) { get_user_ip(id, ip, charsmax(ip)); get_user_name(id, szName, charsmax(szName)); get_user_authid(id, AuthId, charsmax(AuthId)) geoip_country_ex(ip, szCountry, charsmax(szCountry)) geoip_city(ip, szCity, charsmax(szCity))
set_hudmessage(0, 42, 255, 0.03, 0.15, 1, 6.0, 12.0) show_hudmessage(0, "=-{***%s ADMIN***}-=^n-------------------------------------- ^nName: %s ^nSteam ID: %s ^nIP: %s ^nADMIN LEVEL: %s ^n Location: %s, %s ^n-------------------------------------- ",g_svname, szName, AuthId, ip, szOwner, szCity, szCountry) chatcolor(id, "!tWELCOME !yTO !g%s", hostname) } else if (access(id, ADMIN_LEVEL_B)) { get_user_ip(id, ip, charsmax(ip)); get_user_name(id, szName, charsmax(szName)); get_user_authid(id, AuthId, charsmax(AuthId)) geoip_country_ex(ip, szCountry, charsmax(szCountry)) geoip_city(ip, szCity, charsmax(szCity))
set_hudmessage(0, 42, 255, 0.03, 0.15, 1, 6.0, 12.0) show_hudmessage(0, "=-{***%s ADMIN***}-=^n-------------------------------------- ^nName: %s ^nSteam ID: %s ^nIP: %s ^nADMIN LEVEL: %s ^n Location: %s, %s ^n-------------------------------------- ",g_svname, szName, AuthId, ip, szCore, szCity, szCountry) chatcolor(id, "!tWELCOME !yTO !g%s", hostname) } } else { get_user_ip(id, ip, charsmax(ip)); get_user_name(id, szName, charsmax(szName)); get_user_authid(id, AuthId, charsmax(AuthId)) geoip_country_ex(ip, szCountry, charsmax(szCountry)) geoip_city(ip, szCity, charsmax(szCity))
set_hudmessage(0, 42, 255, 0.03, 0.15, 1, 6.0, 12.0) show_hudmessage(0, "=-{WELCOME TO %s PUB SERVER}-=^n-------------------------------------- ^nName: %s ^nSteam ID: %s ^nIP: %s ^n Location: %s, %s ^n-------------------------------------- ",g_svname, szName, AuthId, ip, szCity, szCountry) chatcolor(id, "!tWELCOME !yTO !g%s", hostname) } }
stock chatcolor(const id, const input[], any:...) { new count = 1, players[32] static msg[191] vformat(msg, 190, input, 3) replace_all(msg, 190, "!g", "^4") // Green Color replace_all(msg, 190, "!y", "^1") // Default Color replace_all(msg, 190, "!t", "^3") // Team Color replace_all(msg, 190, "!m", "^0") // Team2 Color
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(); } } } } // JO AUTHOR CHANGE KI GAND MARA UNGA //MADAR CHODE SHIT CODE
__________________
Last edited by OciXCrom; 10-20-2017 at 08:47.
|
|