PHP- Kodu:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "--- Saate Gore Slotluk ---"
#define VERSION "1.0"
#define AUTHOR "Losteps"
#define MAX_SIFRE 300
new dogru[33]
new gsifre[15]
new clanadi2,gyetki2,clanadi[32],gyetki[32];
new zaa
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /durum","BilgiVer")
clanadi2 = register_cvar("amx_clanadi","Meydan ~ ")
gyetki2 = register_cvar("amx_yetki","bijp")
zaa = register_cvar("amx_sure","180")
register_clcmd("Sifreniz","Slot")
get_pcvar_string(clanadi2,clanadi,31)
get_pcvar_string(gyetki2,gyetki,31)
}
public BilgiVer(id)
{
new dakika = (get_user_time(id,1) / 60);
if(dakika < get_pcvar_num(zaa) )
{
client_print(id,print_chat,"Serverde Durdugun Sure : %d Dakika | Slot Olman Icin Gereken Dakika : %d" ,dakika,get_pcvar_num(zaa))
}
if(dakika >= get_pcvar_num(zaa)){
client_print(id,print_chat,"Suren dolmus !! Artik slot olabilirsin!!");
slotol(id)
}
}
public slotol(id)
{
new sMenu
sMenu = menu_create("Slot Olmak Istiyormusunuz ?","slothandle")
menu_additem(sMenu,"Evet","1",0)
menu_additem(sMenu,"Hayir","2",0)
menu_setprop(sMenu,MPROP_EXIT,MEXIT_NEVER)
menu_setprop(sMenu,MPROP_PERPAGE,0)
menu_display(id,sMenu,0)
return PLUGIN_HANDLED;
}
public slothandle(id, sMenu , item){
new data[6], iName[64]
new acces, callback
menu_item_getinfo(sMenu, item, acces, data,5, iName, 63, callback)
new klavyeberks = str_to_num(data)
switch(klavyeberks)
{
case 1 :{
evetdedi(id)
}
case 2 :{
dogru[id] = 0
}
}
return PLUGIN_CONTINUE;
}
public client_connect(id)
{
dogru[id] = 0
}
public client_disconnect(id)
{
dogru[id] = 0
}
public evetdedi(id)
{
dogru[id] = 1
client_cmd(id,"messagemode ^"Sifreniz^"")
client_print(id,print_chat,"Sifrenizi Yazin");
}
public Slot(id)
{
if(dogru[id] == 1)
{
read_args(gsifre,sizeof(gsifre))
remove_quotes(gsifre)
if(equal(gsifre,""))
{
client_cmd(id,"messagemode ^"Sifreniz^"")
client_print(id,print_chat,"Bos Birakmayiniz !");
return PLUGIN_HANDLED
}else {
aktiflestir(id)
}
}else {
client_print(id,print_chat,"Cok akillisin panpis!!");
return PLUGIN_HANDLED;
}
return PLUGIN_HANDLED_MAIN;
}
public aktiflestir(id)
{
new dizin[64]
new str[299]
new gName[32]
get_user_name(id,gName,31)
get_configsdir(dizin,sizeof(dizin))
format(str,291,"^t^n^"%s%s^" ^"%s^" ^"%s^" ^"ab^"",clanadi,gName,gsifre,gyetki)
formatex(dizin,sizeof(dizin),"%s/users.ini",dizin)
write_file(dizin,str,-1)
client_cmd(id,"setinfo _pw %s",gsifre)
client_cmd(id,"name ^"%s%s^"",clanadi,gName)
server_cmd("amx_reloadadmins")
client_print(id,print_chat,"Slotunuz aktiflestirildi!");
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1055\\ f0\\ fs16 \n\\ par }
*/