[FilterScript] /settele /gototele
#1

Greetings reader,

It's me again with another little script which needs to be inserted into your gamemode, sorry for that

40 lines, not much work, is it?

Anyways here's a little explenation

Before I made my own /getcarhere, i used this to get vehicles from my old rp gamemode

I /settele'd, i /gotocar vehid'd, went into the vehicle and /gototele.
So that was before I made my /getcarhere cmd.

Now I usually do this to demonstrate things such as the parking system in my server.

All you need is zcmd.inc, or for what I know there might be more

Heres the code: ( 40 lines )

Код:
new TeleportDest[MAX_PLAYERS][3];

CMD:settele(playerid, params[])
{
        if(IsPlayerAdmin(playerid)) // var can be changed // remove for stunt servers
        {
                GetPlayerPos(playerid, TeleportDest[playerid][0],TeleportDest[playerid][1],TeleportDest[playerid][2]);
                SendClientMessage(playerid, COLOR_WHITE, "Teleport destination set!");
        }
        else
        {
                SendClientMessage(playerid, COLOR_WHITE, "   You are not authorized to use that command !"); // remove 4 stunt srvr
        }
        return 1;
}
 
CMD:gototele(playerid, params[])
{
        if(IsPlayerAdmin(playerid)) // var can be changed // remove 4 stunt servers
        {
                if(TeleportDest[playerid][0] == 0.0 && TeleportDest[playerid][1] == 0.0 && TeleportDest[playerid][2] == 0.0) {
                        SendClientMessage(playerid, COLOR_WHITE, " You need to mark your teleport first by using /settele");
                        return 1;
                }
                if(GetPlayerState(playerid) == 2)
                {
                        new tmpcar = GetPlayerVehicleID(playerid);
                        SetVehiclePos(tmpcar, TeleportDest[playerid][0],TeleportDest[playerid][1],TeleportDest[playerid][2]);
                }
                else
                {
                        SetPlayerPos(playerid, TeleportDest[playerid][0],TeleportDest[playerid][1],TeleportDest[playerid][2]);
                }
                displayCenterHUDInfo(playerid,  "~r~Teleporting!", 8);
                SetPlayerInterior(playerid,0);
        }
        else
        {
                SendClientMessage(playerid, COLOR_WHITE, "   You are not authorized to use that command !"); //remove 4 stunt srvr
        }
        return 1;
}
pastebin: http://pastebin.com/rci4uAyR

(make sure you have the variable, couldn't add it to pastebin)
Reply
#2

This could be good for stunt servers, it would be good if it saved in a file so you could keep using the teleport
Reply
#3

Good job
Reply
#4

Nice .
Reply
#5

3 warnings
Reply
#6

Good work
Reply
#7

Good job!
Reply
#8

Nice one
Reply
#9

Nice dude
Reply
#10

Good Job
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)