PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <csstats>
#define PLUGIN "TOPPlayer"
#define VERSION "1.0"
#define AUTHOR "digkill"
new g_topEnt[33]
new MODEL_1[] = "models/player/top1/top1.mdl"
new MODEL_2[] = "models/player/top1/top1.mdl"
new MODEL_3[] = "models/player/top2/top2.mdl"
new MODEL_4[] = "models/player/top2/top2.mdl"
new MODEL_5[] = "models/player/top3/top3.mdl"
new MODEL_6[] = "models/player/top3/top3.mdl"
new g_CachedStringInfoTarget
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_cvar("mestop", "Serverin top15 zirvesinden %name% oyuna girdi!")
register_cvar("amxflag","1")
RegisterHam(Ham_Spawn, "player", "fwHamPlayerSpawnPost", 1);
g_CachedStringInfoTarget = engfunc( EngFunc_AllocString, "info_target" );
}
public topjoin(user[])
{
if (get_cvar_num("amxflag")==0){
return PLUGIN_HANDLED
}
if (get_cvar_num("amxflag")==1){
new message[192]
get_cvar_string("mestop", message, 191)
replace(message, 191, "%name%", user[1])
set_hudmessage(255, 0, 0, 0.40, 0.45, 0, 6.0, 6.0, 0.5, 0.15, 4)
show_hudmessage(0, message)
return PLUGIN_CONTINUE
}
return PLUGIN_CONTINUE
}
public plugin_precache()
{
precache_model(MODEL_1)
precache_model("models/player/top1/top1T.mdl")
precache_model(MODEL_2)
precache_model(MODEL_3)
precache_model(MODEL_4)
precache_model(MODEL_5)
precache_model(MODEL_6)
}
public fwHamPlayerSpawnPost(id)
{
new stats[8], bodyhits[8]
new iRank
new user[32], len
iRank = get_user_stats(id, stats, bodyhits)
user[0] = id
len = get_user_name(id,user[1],31)
if(1 <= iRank <= 1 )
{
if(is_user_alive(id))
{
new iEnt = g_topEnt[id]
new iEnt2 = g_topEnt[id]
if( !pev_valid(iEnt))
{
set_task(2.0, "topjoin", 0, user,len + 2)
client_print(id, print_chat, "Hosgeldiniz, Top15te 1. siradasiniz!")
g_topEnt[id] = iEnt = engfunc(EngFunc_CreateNamedEntity, g_CachedStringInfoTarget)
g_topEnt[id] = iEnt2 = engfunc(EngFunc_CreateNamedEntity, g_CachedStringInfoTarget)
set_pev(iEnt, pev_movetype, MOVETYPE_FOLLOW)
set_pev(iEnt, pev_aiment, id)
set_pev(iEnt2, pev_movetype, MOVETYPE_FOLLOW)
set_pev(iEnt2, pev_aiment, id)
engfunc(EngFunc_SetModel, iEnt, MODEL_1)
engfunc(EngFunc_SetModel, iEnt2, MODEL_2)
}
}
}
if(2 <= iRank <= 2)
{
if(is_user_alive(id))
{
new iEnt = g_topEnt[id]
new iEnt2 = g_topEnt[id]
if( !pev_valid(iEnt))
{
set_task(2.0, "topjoin", 0, user,len + 2)
client_print(id, print_chat, "Hosgeldiniz, Top15te 2. siradasiniz!")
g_topEnt[id] = iEnt = engfunc(EngFunc_CreateNamedEntity, g_CachedStringInfoTarget)
g_topEnt[id] = iEnt2 = engfunc(EngFunc_CreateNamedEntity, g_CachedStringInfoTarget)
set_pev(iEnt, pev_movetype, MOVETYPE_FOLLOW)
set_pev(iEnt, pev_aiment, id)
set_pev(iEnt2, pev_movetype, MOVETYPE_FOLLOW)
set_pev(iEnt2, pev_aiment, id)
engfunc(EngFunc_SetModel, iEnt, MODEL_3)
engfunc(EngFunc_SetModel, iEnt2, MODEL_4)
}
}
}
if(3 <= iRank <= 3)
{
if(is_user_alive(id))
{
new iEnt = g_topEnt[id]
new iEnt2 = g_topEnt[id]
if( !pev_valid(iEnt))
{
set_task(2.0, "topjoin", 0, user,len + 2)
client_print(id, print_chat, "Hosgeldiniz, Top15te 3. siradasiniz!")
g_topEnt[id] = iEnt = engfunc(EngFunc_CreateNamedEntity, g_CachedStringInfoTarget)
g_topEnt[id] = iEnt2 = engfunc(EngFunc_CreateNamedEntity, g_CachedStringInfoTarget)
set_pev(iEnt, pev_movetype, MOVETYPE_FOLLOW)
set_pev(iEnt, pev_aiment, id)
set_pev(iEnt2, pev_movetype, MOVETYPE_FOLLOW)
set_pev(iEnt2, pev_aiment, id)
engfunc(EngFunc_SetModel, iEnt, MODEL_5)
engfunc(EngFunc_SetModel, iEnt2, MODEL_6)
}
}
}
else
{
return PLUGIN_HANDLED
}
return PLUGIN_CONTINUE
}
/tmp/text8yClSA.sma(32) : warning 217: loose indentation
/tmp/text8yClSA.sma(63) : warning 217: loose indentation
/tmp/text8yClSA.sma(73) : warning 217: loose indentation
/tmp/text8yClSA.sma(74) : warning 217: loose indentation
/tmp/text8yClSA.sma(85) : warning 217: loose indentation
/tmp/text8yClSA.sma(94) : warning 217: loose indentation
/tmp/text8yClSA.sma(95) : warning 217: loose indentation
/tmp/text8yClSA.sma(115) : warning 217: loose indentation
/tmp/text8yClSA.sma(116) : warning 217: loose indentation
Can someone help me to fix these warnings?