|
|
#1 |
|
Gangsta
![]() ![]() ![]() ![]() Join Date: May 2011
Location: Russia, Vladivostok
Posts: 729
Reputation: 43
|
System Control Plugin Version 0.3![]() Author: jhonyxakep Mail:jhonyxakep@qip.ru ICQ:354794596 Jabber:jhonyxakep@qip.ru I thought this plugin could be useful in the english section. Description: The plugin uses the BASS library (http://un4seen.com) to work with audio files. In the plug collected some very useful features not available in SA: MP Installation: Windows: Put the files from the plugins in the plugins folder on the server. bass.dll file should be placed in the root directory of the server (the ones where the samp-server.exe), or the windows system directory Linux: File libbass.so should be put in the folder / lib /, / usr / lib /, / usr / local / lib /. Add the plug-in in plugins section in SA: MP config. Include SystemControl.inc to your script. Use: Plugin functions: ClearConsole(); - clears the server console. In Windows, use the call CLS, in Linux - clear system(file[]); - Launches an external application (on server) and waits for its completion. Returns exit code of the application. In Linux equivalent function WinExec. WinExec(file[],ShowParam); - launch an external application (on server) without having to wait In the first argument specifies the path to the application that should run. ShowParam can be one of constant: PHP Code:
More information about the work function can be read on MSDN: http://msdn.microsoft.com/en-us/libr...(v=vs.85).aspx Fixed: Sleep(milliseconds); - suspends the execution of an application for a specified number of milliseconds Can be used with multithreading plug-ins. In Linux uses usleep http://msdn.microsoft.com/en-us/libr...(v=vs.85).aspx GetCursorPos(&x,&y); - get the position of the cursor on the screen (the server) Return the position of the cursor on the server. In linux returns 0. http://msdn.microsoft.com/en-us/libr...(v=vs.85).aspx GetAudioURLFileLengthSec(URL[]); - returns the length of the audio stream in seconds GetAudioURLFileLengthBytes(URL[]); - returns the length in bytes of the audio stream Uses BASS library. Gets the length of the audio stream or file from the server. If the stream does not have the length function returns -1, otherwise returns GetAudioURLFileLengthSec length in seconds, GetAudioURLFileLengthBytes in bytes. ListDirs(path[]); - dirs listing in current path. Call OnListDir if dir founded. Example: PHP Code:
Example: PHP Code:
Example filterscript PHP Code:
Callbacks: public OnListDir(dir[]) public OnListFile(file[]) Useful const: Math: PHP Code:
Who wants to see more of the system, Windows, and other functions in this plug-in, write in the comments. ![]() SysControl.zip = Include + Example Script + linux and windows version of plugin + Source code Download: in attachment Sorry for my bad English. ![]() Original post: http://forum.sa-mp.com/showthread.ph...32#post1708632 Last edited by jhonyxakep; 09/03/2012 at 07:11 AM. |
|
|
|
|
|
#2 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Jun 2009
Location: The Polish guy in The Netherlands
Posts: 2,299
Reputation: 286
|
I'm kinda wondering how everyone is going to use this to exploit hosters...
|
|
|
|
|
|
#3 |
|
Guest
Posts: n/a
|
GetCursorPos(&x,&y); - Awesome!
|
|
|
|
#4 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Jun 2007
Location: Western Germany
Posts: 2,873
Reputation: 618
|
Well, it still cant do more than the permissions allow, so as long as the hosters set everything up properly nothings going to be exploited
![]() Anyways, nice plugin, im quite sure that some people can make good use of system executions. |
|
|
|
|
|
#5 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Dec 2009
Location: Home
Posts: 2,358
Reputation: 212
|
How can i use GetCursorPos if the cursor is hidden? btw good job
|
|
|
|
|
|
#6 |
|
Guest
Posts: n/a
|
helloworld.cpp
pawn Code:
This plugin makes no sense. |
|
|
|
#7 |
|
Banned
![]() Join Date: Jan 2012
Location: Really IDK
Posts: 119
Reputation: 9
|
Kinda Good Job
|
|
|
|
|
|
#8 | ||
|
Gangsta
![]() ![]() ![]() ![]() Join Date: May 2011
Location: Russia, Vladivostok
Posts: 729
Reputation: 43
|
Quote:
Quote:
|
||
|
|
|
|
|
#9 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Dec 2009
Location: Home
Posts: 2,358
Reputation: 212
|
|
|
|
|
|
|
#10 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Jun 2009
Location: The Polish guy in The Netherlands
Posts: 2,299
Reputation: 286
|
pawn Code:
You actually know that this will stop the whole server for the amount of miliseconds? Also, em, Sleep(miliseconds) != usleep(miliseconds * 100). microseconds to miliseconds conversion goes actually by x 1000... not x 100. |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [FilterScript] Vehicle Control System [0.3c] | Shadow_ | Filterscripts | 52 | 25/04/2013 06:00 PM |
| [FilterScript] SA-MP 0.3c Vehicle Control System (Control everything, you want) | Auxxx | Filterscripts | 78 | 09/10/2012 10:40 PM |
| [FilterScript] Vehicle Control System [First Release] | Jack_Leslie | Filterscripts | 38 | 27/02/2012 06:20 PM |
| [FilterScript] Vehicle Control System With Dialogs! - TLG - [NEW] | rbcrp | Filterscripts | 3 | 13/12/2011 11:58 AM |
| Vehicle Control System | GTA-Roleplay | Help Archive | 3 | 09/08/2011 04:32 PM |