Retrieving Script Name - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Retrieving Script Name (
/showthread.php?tid=301838)
Retrieving Script Name -
Scenario - 06.12.2011
Is there a way to retrieve the name of the script when the server is running? For example, as a security feature, if someone tries to use my mode it will delete the .amx file automatically. Obviously if they change the name of the file, it won't delete anything... So again, can I retrieve the name of a script?
Re: Retrieving Script Name -
xMichaelx - 06.12.2011
Don't thinks its possible as you would need to get inside the PC somehow, unless you mean you include something inside your script that would delete if it is used, but you would be deleting your own script,
Re: Retrieving Script Name -
Scenario - 06.12.2011
Quote:
Originally Posted by xMichaelx
Don't thinks its possible as you would need to get inside the PC somehow, unless you mean you include something inside your script that would delete if it is used, but you would be deleting your own script,
|
I would only be deleting the .amx file, and that's only if someone uses it at an address not defined by me.
Re: Retrieving Script Name -
cessil - 06.12.2011
yes with
GetServerVarAsString(server var[],string[],max size);
example
GetServerVarAsString("gamemode0",servervars,sizeof (servervars));
Re: Retrieving Script Name -
Scenario - 06.12.2011
I didn't know that function could retrieve that line, thanks cessil!