Ok, having some problems now with the client messages, they are not apprearing, I have done it on Client_Connect, but it doesnt come up in console when the user gets the "Cannot download map..." message.
Ideally I would like to have the message pop up in one of those nice steamy boxes, but if this isnt possible, I would be happy with just console printing.
Thanks for the help above "Johnny got his gun", and any further help anyone can offer.
Code:
public plugin_init()
{
register_plugin("Download Tester","1.0","JonnyH")
server_cmd("sv_allowdownload 1")
new map[33], mappath[128]
get_mapname(map, 32)
format(mappath, 127, "maps/%s.bsp", map)
new mapsize = file_size(mappath, 0)
if (mapsize >= 4000)
{
server_cmd("sv_allowdownload 0")
} else {
server_cmd("sv_allowdownload 1")
}
return PLUGIN_CONTINUE
}
public client_connect(id){
if (get_cvar_num("sv_allowdownload")==0){
client_cmd(id, "echo ^"========================================================================^"")
client_cmd(id, "echo ^"[KOA] This map is too big to download from the server.^"")
client_cmd(id, "echo ^"[KOA] Please download this map from www.K-O-A.com.^"")
client_cmd(id, "echo ^"========================================================================^"")
} else {
client_cmd(id, "echo ^"========================================================================^"")
client_cmd(id, "echo ^"[KOA] As this map is less than 4mb, you can download it from our server.^"")
client_cmd(id, "echo ^"Visit www.K-O-A.com for more info.^"")
}
}