[HELP] Ini Check Player Exists
Hello. I am running into a problem with my script for my HL1 server. It basically reports players and stores them in an ini file. The problem is that I don't know how to make it only add the reported player to the ini file if it wasn't already reported by the reporter.I use ReporterName and ReportedName vars. Thanks!
Code:
get_user_name(id, ReporterName, charsmax(ReporterName));Code:
new Player = find_player("bl", ReportedName); |
Re: [HELP] Ini Check Player Exists
I almost did it, but it's not perfect yet.
|
Re: [HELP] Ini Check Player Exists
So, do you have an actual question? If you have code already, you need to attach the file so that we can see what you are working with. Then, explain what exactly your problem is.
Really the only thing that we can say at this point is: If you don't want to duplicate something in the file the you have to check if it exists first and if it does, don't add it again. |
Re: [HELP] Ini Check Player Exists
Quote:
http://pastebin.com/qxj1Ht00 I would like it to print a message that the player was already reported by the user. Thanks, and upload it back to pastebin as private 1 day. The reason why i don't really want my plugin to be public is because ti is specifically made for my HL server so it's better to just come back with a link that will be active for only 24 hours. |
Re: [HELP] Ini Check Player Exists
PHP Code:
|
Re: [HELP] Ini Check Player Exists
1 Attachment(s)
There are many thing wrong with this code:
P.S. Nothing on the internet is temporary. Also, there is no need to hide a plugin like this. The concept and code are both trivial. I've attached the original plugin so that people looking at this thread in the future will have a reference for my comments. |
Re: [HELP] Ini Check Player Exists
Quote:
|
| All times are GMT -4. The time now is 18:02. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.