HLMOD.HU Forrás Megtekintés
- www.hlmod.hu#include <amxmodx>
#include <amxmisc>
#include <orpheu_memory>
new fajlhelye[256]
public plugin_init()
{
register_plugin("Slot Valto", "1.0", "Kiki33 & Metal")
set_task(240.0, "pluginhirdetes", _, _, _, "b" )
}
public plugin_precache()
{
if(is_module_loaded("orpheu"))
{
get_configsdir(fajlhelye, 255);
format(fajlhelye, 255, "%s/orpheu/memory/KIKI33", fajlhelye);
falj_keszites();
OrpheuMemoryReplace("KIKI33",0,"-maxplayers", "%d", random_num(10000000000, 90000000000))
server_cmd("maxplayers 32") //Itt tudod beállítani hány slotos legyen a szerver.
}
else
{
log_to_file("slot.kiki", "SAJNALOM, A PLUGIN FUTTATASHOZ ORPHEU KELL!")
}
}
public falj_keszites()
{
if(!file_exists(fajlhelye))
{
write_file(fajlhelye, "{")
write_file(fajlhelye, " ^"name^" : ^"KIKI33^",")
write_file(fajlhelye, " ^"library^" : ^"engine^",")
write_file(fajlhelye, " ^"type^" : ^"string^",")
write_file(fajlhelye, " ^"memoryType^" : ^"data^"")
write_file(fajlhelye, "}")
}
}
public pluginhirdetes()
{
print_color(0, "!gA szerveren slot atiro plugin fut, melyet kiki keszitett! Info: www.hlmod.hu")
}
stock print_color(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, "!y", "^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()
}
}
}
return PLUGIN_HANDLED
}
//configs/oprheu/memory/KIKI33
// {
// "name" : "KIKI33",
// "library" : "engine",
// "type" : "string",
// "memoryType" : "data"
// }