Some help with this plugin

Started by cezars
24/10/2010 22:12
Page 1 of 1
cezars24/10/2010 22:12(edited 24/10/2010 22:13)

Someone can change this plugin to use 3 records now it`s only use 1 but i need 3 wen you use /wr to shot all the records exemple:

World Records is x:x that is taking from demos.txt
Cosy Record is x:x that is taking from demoscc.txt
Country record is x:x tat is taking from demoscountry.txt

i got this source from this site other thread i think you get the idea here is the source

#include 
#include
#define PLUGIN "wr"
#define VERSION "1.2"
#define AUTHOR "Break"

new filename[128]
new wr[256]

public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)

register_clcmd("say /wr","show_wr")

format(filename, 127, "addons/amxmodx/configs/demos.txt")
get_wr()
}

public get_wr() {

if (file_exists(filename) == 1) {
new line, stxtsize
new data[64]
new cMap[32]
get_mapname(cMap, 31)
new MapName[32], jumper[32], t[16], tnum = 0, len, pMap[32], ext[16]

while ((line = read_file(filename,line,data,63,stxtsize)) != 0)
{
parse(data, MapName, 31, t, 15, jumper, 31)
if (containi(MapName, "[") != -1) {
replace(MapName, 31, "[", " ")
replace(MapName, 31, "]", " ")
parse(MapName, pMap, 31, ext, 15)
MapName = pMap
} else
ext= ""
if (equal(MapName, cMap)) {
if (!tnum) {
tnum = str_to_num(t)
len = format(wr, 255, "World Record:^n Map: %s^n Author: %s (%d:%02d) %s", cMap, jumper, tnum/60, tnum%60, ext)
} else {
tnum = str_to_num(t)
len += format(wr[len], 255-len, "^n %s (%d:%02d) %s", jumper, tnum/60, tnum%60, ext)
}
}
}
if (!tnum)
format(wr, 255, "World Record:^n Map: %s^n Author: N/A", cMap)
}
else
wr = "Failed to load database!"

return PLUGIN_CONTINUE
}

public show_wr(id) {
set_hudmessage(255, 255, 255, 0.01, 0.2, 0, 0.0, 10.0, 0.4, 0.4, 4)
show_hudmessage(id, wr)
}

dx^06/12/2010 21:29

lol i never see this plugin =x

doktor08/12/2010 21:49

This plugin is bad because you have to manually update the demo file.
Search for other wr plugins that have autoupdate feature.

Page 1 of 1

Please log in to post replies.