Güncell Arkadaslar
Merhaba arkadaslar bu gece plugin cvar baglamak istiyorum mesela oylamayi kaldırmak istiyorum. sadece adminler gece yapa bilme yetkisi olsun.
Kod:#include <amxmodx>#include <amxmisc> #include <engine> #define VOTETIME 75.0 //time after map starts when the vote begins new normalsky[64]; new choice[2] new is = 1 new was = 1 new reconnect = 0 new cvar public plugin_init() { register_logevent("reconnectplayers",2,"0=World triggered","1=Round_Start") get_cvar_string("sv_skyname" , normalsky , 63); is = 1 was = is register_plugin("daynight","1.1","NL)Ramon(NL") cvar = register_cvar("sv_daynight", "1") register_concmd("amx_voteday","votedaynow", ADMIN_BAN,") } public plugin_precache() { precache_generic("gfx/env/spacert.tga") precache_generic("gfx/env/spacelf.tga") precache_generic("gfx/env/spaceft.tga") precache_generic("gfx/env/spacedn.tga") precache_generic("gfx/env/spacebk.tga") precache_generic("gfx/env/spaceup.tga") } public checkclient(){ if (is == was) { return PLUGIN_HANDLED } else { client_print(0,print_chat,"Reconnecting all players on next round seconds to change sky") was = is reconnect = 1 } return PLUGIN_CONTINUE } public reconnectplayers() { if (reconnect == 1) { reconnect = 0 client_cmd(0,"reconnect") } }
Güncell Arkadaslar
amx_gece yazarsan gece olur, amx_gunduz yazarsan gündüz olur
PHP- Kodu:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <engine>
new normalsky[64];
new reconnect = 0
new is = 1
new was = 1
public plugin_precache() {
precache_generic("gfx/env/spacert.tga")
precache_generic("gfx/env/spacelf.tga")
precache_generic("gfx/env/spaceft.tga")
precache_generic("gfx/env/spacedn.tga")
precache_generic("gfx/env/spacebk.tga")
precache_generic("gfx/env/spaceup.tga")
}
public plugin_init() {
register_plugin("daynight","1.1","NL)Ramon(NL")
is = 1
was = is
register_concmd("amx_gece","cmd_gece", ADMIN_BAN)
register_concmd("amx_gunduz","cmd_gunduz",ADMIN_BAN)
get_cvar_string("sv_skyname" , normalsky , 63);
register_logevent("reconnectplayers",2,"0=World triggered","1=Round_Start")
}
public cmd_gece(id,level,cid) {
if(!cmd_access(id,level,cid,1)) {
return PLUGIN_HANDLED
}
server_cmd("sv_skyname space")
set_lights("b")
checkclient()
return PLUGIN_HANDLED
}
public cmd_gunduz(id,level,cid) {
if(!cmd_access(id,level,cid,1)) {
return PLUGIN_HANDLED
}
set_cvar_string("sv_skyname" , normalsky);
set_lights("#OFF")
checkclient()
return PLUGIN_HANDLED
}
public checkclient(){
if (is == was)
{
return PLUGIN_HANDLED
}
else
{
client_print(0,print_chat,"Reconnecting all players on next round seconds to change sky")
was = is
reconnect = 1
}
return PLUGIN_CONTINUE
}
public reconnectplayers() {
if(reconnect == 1) {
reconnect = 0
client_cmd(0,"reconnect")
}
}
Steam ID: STEAM_1:0:70428872
Steam Name: Seps!s
Skype: jdm.csplague
Takdir ediliyorsan değil, Taklit ediliyorsan başarmışsın demektir.
Albert Einstein