dynamic rename / move file
Hi ,
I am just learning coding :oops: Need one help . suppose I have one directory ../sound/misc/custom/001.wav ../sound/misc/custom/002.wav ../sound/misc/custom/003.wav it can be any but the sequence have to be a continuous sequence . Now at the time of plugin_init 1) i need to put one random file to the folder misc and also after renaming it to fun . ../sound/misc/fun.wav how can I do that ..it's for learning nothing else :) |
Re: dynamic rename / move file
If you're talking about putting files on clients, it's impossible to place a different structure than the files precached, you can precache files in plugin_precache() with precache_*() functions.
But if you're talking about renaming and moving files on the server, see file.inc or http://www.amxmodx.org/funcwiki.php?go=inc&id=3 |
Re: dynamic rename / move file
okie .. actually i was trying to create one opengl detector ...
in such plugin file will be there in a folder with sequence name like 001.dll / 002.dll And at each round start randomly one file will be copied to ../opengl.dll and server will check if the exact file exists on client .. if exists then kick :) I have done the part where checking is done but not able to dynamic moving prt :( |
Re: dynamic rename / move file
Quote:
Not possible. AMXX cannot see client-side files. |
Re: dynamic rename / move file
I will check at the time of connect only ...
But for each precache / map change the file should change ... got my point ? |
Re: dynamic rename / move file
Once it's on the client machine, you can't change it's name or contents.
|
Re: dynamic rename / move file
Quote:
Lemme explain 1) I have some opengl hack which we have to place in the counter strike installation folder in order to enable the hack . Now my main aim is to detect some of them Detection logic . 1) I will have one folder in server ../opengl/ In that i will place all the opengl hack . e.g. assume the name is 001.dll , 002.dll ......... 2) Now at the time of map change i will select any one of the opengl (lets assume we have taken 002.dll) and will put it in the HLDS directory with name openg32l.dll ( so we need to move 002.dll to the base folder and have to rename it too opengl32.dll) 3) Now when client will connect I will check whether
|
Re: dynamic rename / move file
Well, if it's client-side then you need to find another website to ask because this forum is for server-side scripting.
|
Re: dynamic rename / move file
Quote:
It will not do any changes in client side .... I think you are not getting my explanation ( may be I am a noob to make people understand my need :P) |
Re: dynamic rename / move file
I don't understand how openGL has anything to do with the server. It's a client-side application. But, since you are seemingly hacking clients then maybe you should just stop asking here.
Anyways, all file modification functions are in the link in post #2. |
| All times are GMT -4. The time now is 03:19. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.