Small help for /wr plugin

Started by break4yFTW
26/10/2007 13:29
Page 1 of 1
break4yFTW26/10/2007 13:29

#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 ]

VipKiller26/10/2007 13:49

http://xtreme-jumps.eu/forum_viewtopic.php?46.53375
.....

SchlumPF26/10/2007 15:09

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 ]

break4yFTW26/10/2007 19:38

I updated a demos.txt

Z0ck3rOO726/10/2007 20:22

everybody can update it: http://xtreme-jumps.eu/demos.txt

SchlumPF26/10/2007 20:30

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.

maniac26/10/2007 21:14

I think Z0ck3r means Br3aK!
Nice Plugin SchlumPF, thx 4 sharing it! :D

ichirou26/10/2007 21:28

btw u just copyed dajrokans code and released this plugin with ur name...

PaPa SchlumPF


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.

SchlumPF27/10/2007 01:03

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....

ichirou27/10/2007 07:33

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....

PaPa SchlumPF


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.

SchlumPF27/10/2007 14:27

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 ]

SchlumPF28/10/2007 14:23

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

thopa29/11/2008 21:20(edited 29/11/2008 21:22)

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. :)

cC|SpiNe29/11/2008 23:10

Im pretty sure i've seen that somewhere Thopa. It's a nice plugin.

SchlumPF30/11/2008 00:21

just use my kz_records, its includes the feature you suggested thopa

cap1m;06/02/2009 00:42(edited 06/02/2009 00:46)

http://members.allstars-united.net/papaschlumpf/worldrecords/worldrecords.rar link down! please repost SchlumPF

Page 1 of 1

Please log in to post replies.