Small help for /wr plugin
#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)
}
This is code of wr.sma... For wr.amxx have to compile wr.sma :)
Pic:
Click
Demo:
Click
Download a (wr.amxx) and (wr.amxx):
Click Me!
If only to be helped
Sorry for my english. I ignorance must well a english :)
[ Edited ]
http://xtreme-jumps.eu/forum_viewtopic.php?46.53375
.....
to slow br34k :P btw i asked a friend whether he knows a way to update the demos.txt automaticly. he said that i could code it with the socketmodul... but i didnt get it to work so he made it for me :D wr plugin (not my work!!! read the readme.txt! just made those 2 plugins into one!)
http://members.allstars-united.net/papaschlumpf/worldrecords/worldrecords.rar
btw u just copyed dajrokans code and released this plugin with ur name... its not ur work! this also means ur violating the gpl2... we had the same problem here: http://xtreme-jumps.eu/forum_viewtopic.php?46.61041.0
[ Edited 10/26/07 - 15:15:02 ]
I updated a demos.txt
everybody can update it: http://xtreme-jumps.eu/demos.txt
i know that everybody can update is manually by downloading and replacing tghe demos.txt... but the plugin i posted does this automaticly! when u start a server it downlaods the latest demos.txt (which does not take any bandwith because of demos.txt's size) and uses it for the /wr function.
I think Z0ck3r means Br3aK!
Nice Plugin SchlumPF, thx 4 sharing it! :D
btw u just copyed dajrokans code and released this plugin with ur name...
Is that true? If so... It's just plain stupid to take creds for someone elses plugin and not to mention a very big lack of common sense in open source coding.
If you have "borrowed" parts of another ones code in your code you should specify exactly what functions that is made by you and what that is made by the other one.
its true... i copyed his code and put it into one plugin because he also made it in his kz plugin and i was to lazy to build the whole plugin on my own :P but i wrote in readme etc that i just put the code into the plugin and that alls credits go to dajrokan....
its true... i copyed his code and put it into one plugin because he also made it in his kz plugin and i was to lazy to build the whole plugin on my own :P but i wrote in readme etc that i just put the code into the plugin and that alls credits go to dajrokan....
Hm... maybe I misunderstood you or the other way around... but my point was being made for Br3aK. I thought you said that HE copied the plugin and released it with his name. And that's just wrong, if he did.
It's nothing wrong with the one you released imo, schlumpf. You clearly state at the beginning of the file that darjokan has made it.
forgot to add "too" in my sentence ^^
br3ak just copyed it without credit
i copyed it with credit
[ Edited 10/27/07 - 14:27:55 ]
sry but i made a little mistake. the plugin downlaods the demos.txt but it saves it was httpread.txt. pls download the plugin again to get that fixed!
im sry xD next time i test the plugin myself if i post it here
A little suggestion I think would be nice concerning this plugin.
/wr shows the record of the current map..
/wr mapname; shows the record of the mapname you inserted, like /wr kz_man_terablock. People talk all the time ingame and discuss various records and stuff, so It could be handy. :)
Im pretty sure i've seen that somewhere Thopa. It's a nice plugin.
just use my kz_records, its includes the feature you suggested thopa
http://members.allstars-united.net/papaschlumpf/worldrecords/worldrecords.rar link down! please repost SchlumPF
Please log in to post replies.