[REL] Dtel - Dialog Teleporting - 0.1f
#1

About

A simple teleports dialog which allows you to load/save/remove teleport points whilst ingame.
It's file based and loads automatically on Init(), it then saves on a timer if not deactivated and you can use the rcon admin (by default) command '/savelist' to save the current points buffer.
It has an option to save periodically but this can be deactivated with a compile option, it's activated by default.
Make sure you use the rcon command '/savelist' to save your points if you deactivate timed saving or your points won't be saved unless you manually unload the filterscript.
It has a current limit of 128 seperate teleports all with their own unique name and config.
There are a good few defines for controlling your script compile and features.
You can use different keys or/and command to activate the dialog whilst on foot or in a vehicle.
Any files saved as the old format will automatically be converted.
I've had to change the way I save the coordinates due to an issue with floatstr.

Download

Uploadffs -> dtel.pwn / dtel.amx

Required include files -> zcmd / foreach

Usage

Add the name of the file to the end of your servers config file "filterscripts" line like so:

pawn Код:
filterscripts dtel
If you don't have the "filterscripts" line then add it like explained above to the bottom of your server config file.

If you have the file 'teleport.tel' in your scriptfiles and it has teleports in it which are in the old format then the script will convert it to the new format when you type 'exit' into the console or you use the '/savelist' command or by default it will save them periodically using the timer.

You can configure the script with several options like by default only admins can save points so if you don't want it to be admin only then add:

pawn Код:
#define IGNORE_ADMIN_CHECK
I have put examples of them in the test file so take a look in there for a quick explination of most of them.

In a default script both command and keys are activated so to use the script go ingame and take a look at the help messages when you spawn. They will tell you what you need to do and what keys you use etc.

The command to sav points is like so:

pawn Код:
/sav [parachute (1-0)] [name]
The save format looks like so:

pawn Код:
// x y z angle interior v_world parachute name
429.696472 2502.561035 23.939916 0.000000 0 0 0 desert
2907.836425 -1963.764160 11.668781 0.000000 0 0 0 lsbeach
Credits

Jasen for J-Tel, it inspired me to add dialogs.
Draco, Kye for various code.
****** for foreach and various code.
Zeex for zcmd.
CracK for bug reporting.

Bugs

Hopefully none, I haven't spotted any but some may pop up on reloading and I can't check that on my Lan sorry so please report to me any which you find or you can fix them yourself and post the fix as I have commented the source pretty well so it should be easy to read.

Screens(old screens)



Version

0.1f

Change Log

0.1f :-

corrected the size of floats so the 'floatstr' bug won't occur (hopefully)
fixed some typos and minor issues
added a few more debug messages

0.1e :-

fixed an issue with some data not being saved in the correct format (thanks to CracK for reporting this)
fixed an issue with the reloading of the dialog when not in use and not flagging it as false when you cancel
fixed some string size and nulling issues, use strdel now instead of EOS and the format is the correct size
fixed some return values, other scripts were processing the dialog when they didn't need to
corrected the version macro


0.1d :-

added a 'savelist' command for rcon admins
added 'foreach' by ****** for efficient looping
added 'zcmd' by Zeex for efficient command processing
fixed the 'rem' and 'savelist' commands admin checks macro
fixed some debug messages not showing due to hook calls
fixed the command parameters for '/sav'
improved several snippets of code so the script is more stable
changed the file data config to end with the name (requested by CracK (spaces))
removed gamemode functionality, it will now run as a filterscript (better this way IMO)
removed hooking of callbacks due to being a filterscript now

0.1c :-

fixed the keystates not working correctly under certain circumstances, thankyou to ****** for his Wiki post.

0.1b :-

added virtual world support
added compile option to ignore virtual worlds
added support for activating the dialog list whilst in a vehicle
added a compile option to ignore in vehicle activation for the dialog list
added timed saving of points, they will save periodically
added compile options to control points saving done with the timer and its interval
fixed an issue with list messages not showing the last entry
fixed an issue with the more message showing when there was less than half the max points and wasn't required
fixed an issue with the points count
compatible with J-Tel, no modifying was needed but it was tested
Reply
#2

SS please.
Reply
#3

Updated, see first post.
Reply
#4

Very good job, it's very useful.
Reply
#5

Keep up the good work.
Reply
#6

Quote:
Originally Posted by - [ WHITE ~ ENERGY
- ]
Very good job, it's very useful.
Quote:
Originally Posted by Don Correlli
Keep up the good work.
Thankyou, I'll do my best.

PS. Redownload it please, I just updated it to not show the dialog after adding one, it actually became annoying but I wanted it that way at first. If you want it that way again then I'll add a compile option.
Reply
#7

Good work, looks great
Reply
#8

Quote:
Originally Posted by Jasen
Good work, looks great
Thankyou, cheers for the inspiration also.
Reply
#9

Updated to 0.1c.
Reply
#10

Nice work
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)