[Include] Teleports.inc - Easily create teleports with 1 line!
#9

It's quite useful as long as more stuff added to it (see below).

Quote:
Originally Posted by Lordzy
Посмотреть сообщение
I had been developing an include similar to this but discontinued due to lack of interest. Seeing this, I remember few features that I had planned earlier. You've included a command argument but I don't see a good use of it. I suggest you to use the "CMD_NAME" array along with "OnPlayerCommandPerformed" (since zcmd and y_cmd are used frequently) so that the ones using this include don't require to create commands for teleport. It could be done completely in single line.

I had also planned to provide complete vehicle support and pedestrian support while teleporting, which also ensures that they teleport safe in case of streamer objects. Teleportation over an area could also improve this include where players could teleport to a random solid point in an area. These were few of them I planned earlier but I strongly suggest you to consider creating automatic commands. Here's an example of it:

pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success) {

    if(!success) { //In case if it's not present in the script, only then we've to check.
 
        for(new i = 0; i< MAX_TELEPORTS; i++) { //Loop through teleport data
 
            if(!strcmp(cmdtext, TeleportData[i][CMD_NAME], true, strlen(TeleportData[i][CMD_NAME]]) {

                //Teleport
            }
        }
    }
    return 1;
}
We had used the same idea (the callback of ZCMD)! I had also written in the past a (static though) system for teleports and with a line you could specify if the player will teleport on foot/vehicle, with/without weapons (if with weapons, which - useful for DM teleports too) and a friend of me had suggested a type of teleport (stunts, DMs, fun, Interiors etc).
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)