SA-MP Forums Archive
[FilterScript] /settele /gototele - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] /settele /gototele (/showthread.php?tid=547581)



/settele /gototele - JaydenJason - 23.11.2014

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)


Re: /settele /gototele - LeXuZ - 23.11.2014

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


Re: /settele /gototele - M0HAMMAD - 24.11.2014

Good job


Re: /settele /gototele - UltraScripter - 28.12.2014

Nice .


Re: /settele /gototele - xXdaeminoXx - 06.03.2015

3 warnings


Re: /settele /gototele - Younes44 - 06.03.2015

Good work


Respuesta: /settele /gototele - ManuelAbregu - 06.03.2015

Good job!


Re: /settele /gototele - Mark_Samp - 06.03.2015

Nice one


Re: /settele /gototele - X337 - 07.03.2015

Nice dude


Re: /settele /gototele - Finnick - 07.03.2015

Good Job