|
//Cvars
new c_OnOff,c_Message,c_Token,c_StoreType
public plugin_init() {
register_plugin("Server Connect Message",VERSION,"shine")
register_cvar("servconmsg",VERSION,FCVAR_SERVER|FCVAR_SPONLY)
//Cvars
c_OnOff = register_cvar("amx_connect_msg_on","1")
c_Token = register_cvar("amx_connect_msg_token","$")
c_Message = register_cvar("amx_conmsg","欢迎光临本服务器$请遵守服务器规章制度!")
c_StoreType = register_cvar("amx_connect_store_type","1") //1 - steamid, 2 - ip
new tStr[192],Token[2]
//Get Connect Messages from cvars
get_pcvar_string(c_Message,tStr,191)
get_pcvar_string(c_Token,Token,1)
//Write them to a global array
for(new i=0;i < 3;i++) strtok(tStr,g_Messages,191,tStr,191,Token[0])
}
public client_connect(id) { |
|