shutdown /p /f
monday said:Idk more direct way (certainly there is one) but you could create bat file and execute it. It should have the following content:
Here's an example of how to do it:Code:shutdown /p /f
http://ugbase.eu/Thread-Presentation-Command-line-functionality
You'd have to edit the part of the code which writes to the file
Edit: I tested the "shutdown /p /f" command itself by using command line, I guess it should work from the bat file too (which isn't always the case), but I didn't test it. (My pc sometimes refuses to turn on;p)
monday said:Idk more direct way (certainly there is one) but you could create bat file and execute it. It should have the following content:
Here's an example of how to do it:Code:shutdown /p /f
http://ugbase.eu/Thread-Presentation-Command-line-functionality
You'd have to edit the part of the code which writes to the file
Edit: I tested the "shutdown /p /f" command itself by using command line, I guess it should work from the bat file too (which isn't always the case), but I didn't test it. (My pc sometimes refuses to turn on;p)
monday said:this part of the code from that link is responsible for running the file (0AA7 opcode)[shcode=cpp]//by springfield
0AA2: 0@ = "shell32.dll"
if 0AA4: 0@ = "ShellExecuteA" 0@
then
0AA7: 0@ push 6 pop 1 params 1 0 0 "shutdown.bat" 0 0 error_code 1@
if 1@ <= 32
then
printf "FAILURE: %d" 1000 1@
end
end[/shcode]
monday said:it's difficult to examine the fault without seeing the code that was used... Btw what was the error number in the "FAILURE: %d" text?
monday said:is the shutdown.bat located in the gta or cleo folder?
Edit: it should be in the gta folder btw unless you change working directory from the cleo script