PHP- Kodu:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <fakemeta>
#include <engine>
#define PLUGIN "gom plugini"
#define VERSION "1.0"
#define AUTHOR "kaptan647"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /gom", "Gommenu")
register_clcmd("say_team /gom", "Gommenu")
}
public Gommenu(id)
{
if(is_user_alive(id) && get_user_flags(id) & ADMIN_KICK)
{
new menu = menu_create("\r #\w#\r#\w# \rBury \wKontrol \r#\w#\r#\w#","adminmenu_devam")
menu_additem(menu, "Mahkumlari Gom", "1", ADMIN_KICK)
menu_additem(menu, "Mahkumlari Cikart", "2", ADMIN_KICK)
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
menu_display(id,menu,0)
}
}
public adminmenu_devam(id,menu,item)
{
new callback, acces, data[6], iname[64]
menu_item_getinfo(menu, item, acces, data, 5, iname, 63, callback)
switch(str_to_num(data))
{
case 1:
{
new players[ 32 ], pnum;
get_players( players, pnum, "ae", "TERRORIST" );
for( new i; i < pnum; i++ )
{
new ID = players[ i ];
if( is_user_connected( ID ) && !is_user_stuck( ID ) )
{
new Float: ifOrigin[ 3 ];
pev( ID, pev_origin, ifOrigin );
ifOrigin[ 2 ] -= 35.0;
set_pev( ID, pev_origin, ifOrigin );
client_print( 0, print_chat, "Mahkumlar yere gomuldu !" );
}
}
}
case 2:
{
new players[ 32 ], pnum;
get_players( players, pnum, "ae", "TERRORIST" );
for( new i; i < pnum; i++ )
{
new ID = players[ i ];
if( is_user_connected( ID ) && is_user_stuck( ID ) )
{
new Float: ifOrigin[ 3 ];
pev( ID, pev_origin, ifOrigin );
ifOrigin[ 2 ] += 35.0;
set_pev( ID, pev_origin, ifOrigin );
client_print( 0, print_chat, "Mahkumlar yerden cikarildi..!" );
}
}
}
}
menu_destroy(menu)
return PLUGIN_HANDLED
}
stock is_user_stuck( plr )
{
new Float:origin[3];
pev( plr, pev_origin, origin );
engfunc( EngFunc_TraceHull, origin, origin, IGNORE_MONSTERS, pev( plr, pev_flags ) & FL_DUCKING ? HULL_HEAD : HULL_HUMAN, plr, 0 );
return get_tr2( 0, TR_StartSolid );
}