[FilterScript] [FS] Debug Mode
#1

About:

This is a debugging filterscript for SA:MP 0.2, it includes multiple commands and keybased selectors to help you create your own scripts.

It's made to run alongside your current gamemodes, if you do not have a gamemode and would like to start from scratch hit "New" in Pawno and compile the blank gamemode. Then load up the blank gamemode and the filterscript.

You must compile the source (if you didn't download the compiled version), add the DEBUG.amx to your filterscripts/ folder and then add the appropriate lines to your server.cfg. If you do not wish to add it to your server.cfg you can alternatively type loadfs DEBUG into the server console after adding the filterscript to the filterscripts/ folder.

Command List:

World Commands-[*]/w WEATHERIDSets the weather to the specified WEATHERID.[*]/weather WEATHERIDSets the weather to the specified WEATHERID.[*]/t HOURSets the time to the specified HOUR.[*]/time HOURSets the time to the specified HOUR.[*]/wselOpens a keybased weather/time selector. UP / DOWN increases and decreases the current weatherid and LEFT / RIGHT increases and decreases the current hour.[*]/g GRAVITYSets the world gravity to the specified GRAVITY.[*]/gravity GRAVITYSets the world gravity to the specified GRAVITY.

Vehicle Commands-[*]/v VEHICLEID / PART_OF_NAMESpawns the specified VEHICLEID or vehicle that's name is part of PART_OF_NAME.[*]/vehicle VEHICLEID / PART_OF_NAMESpawns the specified VEHICLEID or vehicle that's name is part of PART_OF_NAME.[*]/vselOpens a keybased vehicle selector. LEFT / RIGHT increases and decreases the current vehicleid.

PlayerCommands-[*]/s SKINIDChanges the players skin to the specified SKINID.[*]/skin SKINIDChanges the players skin to the specified SKINID.[*]/sselOpens a keybased skin selector. LEFT / RIGHT increases and decreases the current skinid.[*]/weapon WEAPONID AMMOGives the player the specified WEAPONID and AMMO. If no AMMO is entered then it will give 500 ammo.[*]/w2 WEAPONIDGives the player the specified WEAPONID and AMMO. If no AMMO is entered then it will give 500 ammo.[*]/bring PLAYERID X_OFFSET Y_OFFSET Z_OFFSETBrings the entered PLAYERID to you. The parameters X_OFFSET, Y_OFFSET and Z_OFFSET are optional; these parameters allow you to warp however many game units away from the player.[*]/goto PLAYERID X_OFFSET Y_OFFSET Z_OFFSETBrings the entered PLAYERID to you. The parameters X_OFFSET, Y_OFFSET and Z_OFFSET are optional; these parameters allow you to bring the player however many game units away from your position.[*]/warpto PLAYERID X_OFFSET Y_OFFSET Z_OFFSETWarps you to the selected PLAYERID. The parameters X_OFFSET, Y_OFFSET and Z_OFFSET are optional; these parameters allow you to bring the player however many game units away from your position.[*]/setloc X Y Z INTERIORWarps you to the selected X Y Z and sets your interior to INTERIOR.


Camera Commands-[*]/camera rate MOVE_RATEChanges the rate at which the camera moves with the /csel command.[*]/camera mode MODEIDChanges the mode of the /csel command. This command is left in as a skeleton for anyone who wants to try making a camera rotation selector (I got confused in the maths ).[*]/cselOpens a keybased camera selector with the current mode of choice. By default it is on movement mode which keys are UP /DOWN increases Z and decreases Z, LEFT / RIGHT increases X and decreases X, NUM 4 (key analogue left) / NUM 6 (key analogue right) increases Y and decreases Y.


Notes:

Needs ******'s updated PAWN compiler which is included with 0.2 server, but if for some reason you do not have it, you can download it here.

When using it's full name or part of it's name will get a different vehicle. For typing in /v Dodo will spawn a Voodoo, you must use the vehicle's model ID to spawn the Dodo like so; /v 593 - Resolved in 0.5c by Mike.

There are several pre-processor options in the form of "#define" in the source code, the ones you may be interested in are ...:

pawn Код:
#define SKIN_SELECT     true // Allow skin selection commands.
#define VEHI_SELECT     true // Allow vehicle selection commands.
#define WORL_SELECT   true // Allow world selection commands.
#define CAME_SELECT   true // Allow camera commands.
#define OBJE_SELECT true // Allow object commands.
#define MISCEL_CMDS   true // Allow other commands such as /bring, /goto, /setloc.
#define ADMINS_ONLY   false // Allow admins only. true makes it so only RCON admins can use the commands. false makes it so all players can use the commands.
These specific options are in the form of true false (boolean). Once you have changed them you must recompile the script and then load the newly compiled version.

Download:

0.5c Source - Pastebin.com
0.5c Source + Compiled - RapidShare.com

0.5b Source - Pastebin (Copy and paste from box at bottom of page into Pawno, save and then compile)
0.5b Source - ifastnet (Right Click > Save Target As ...)
0.5b Compiled - ifastnet (Right Click > Save Target As ...)
0.5b Source + Compiled - rapidshare

0.5 Source - Pastebinhttp://pastebin.com/f6300a428
0.5 Source - ifastnet (Right Click > Save Target As ...)
0.5 Compiled - ifastnet (Right Click > Save Target As ...)

0.4 Source - pastebin.co.uk
0.4 Source - ifastnet.com (Right Click > Save Target As ...)
0.4 Compiled - ifastnet.com (Right Click > Save Target As ...)
Reply
#2

WOOPS, nvm, i didnt see it was filterscript...thought it was guide for debug mode XD
Reply
#3

Very nice script Simon, however when I run it on my server i get this run time error in the console.

Quote:
Originally Posted by Teh Logzor
[14:34] Script[gamemodes/debug.amx]: Run time error 20: "Invalid index parameter (bad entry point)"


Cheers,
Ramjet.
Reply
#4

My bad, I should have made it more clear what it was.

It's a filterscript, that means you can compile a blank gamemode (new.pwn) or run it alongside a gamemode you've already made.

Put the compiled file in the filterscripts/ folder and type loadfs DEBUG into the server console or add the filterscript to your server.cfg.
Reply
#5

Opps sorry Simon my bad. I probably should have read it rather than assumed it was a gamemode :P.

Cheers,
Ramjet.
Reply
#6

Simon thank you, this filterscript is very nice.
Thanks.
Reply
#7

how to apply selected vehicle, I can't exit from /vsel
Reply
#8

Quote:
Originally Posted by M@rsik
how to apply selected vehicle, I can't exit from /vsel
Action Key (TAB by default).
Reply
#9

Quote:

C:\Documents and Settings\Francesco\Documenti\samp_server_0.2.scrip ting\pawno\debug.pwn(384) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Documents and Settings\Francesco\Documenti\samp_server_0.2.scrip ting\pawno\debug.pwn(384) : error 017: undefined symbol "menu"
C:\Documents and Settings\Francesco\Documenti\samp_server_0.2.scrip ting\pawno\debug.pwn(384) : warning 215: expression has no effect
C:\Documents and Settings\Francesco\Documenti\samp_server_0.2.scrip ting\pawno\debug.pwn(384) : error 001: expected token: ";", but found "-string-"
C:\Documents and Settings\Francesco\Documenti\samp_server_0.2.scrip ting\pawno\debug.pwn(384) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.

I get these errors while compiling....


EDIT:
i solved using the other mirror... btw the pastebin source mirror is bugged :\
Reply
#10

You are not able to save with this? Like /save?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)