Teleport Command
#3

i made one here it is:

pawn Код:
CMD:tune(playerid, params[])
{
    if(isnull(params))
    {
        SendClientMessage(playerid, red, " Usage: /tune [1-4] ");
        SendClientMessage(playerid, red, " FUNCTION: To Teleport To The Tune Garages ");
        return 1;
    }
    else
    {
        switch(strval(params))
        {
            case 1:
            {
                if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
                {
                    SetVehiclePos(GetPlayerVehicleID(playerid), -1935.985, 231.728, 34.1546);
                }
                else
                {
                    SetPlayerPos(playerid, -1935.985, 231.728, 34.1546);
                }
               
                new msg[999];
                new dsname[MAX_PLAYER_NAME];
                new string[100];
                format(string, sizeof(string), "%s has just teleported to Tune 1 /Tune 1", dsname);
                SendClientMessageToAll(COLOR_YELLOW, string);

                GameTextForPlayer(playerid, "~B~Welcome To ~r~Tune 1", 3000, 4);
                return 1;
            }
            case 2:
            {
                if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
                {
                    SetVehiclePos(GetPlayerVehicleID(playerid), -2709.731, 217.423, 4.179);
                }
                else
                {
                    SetPlayerPos(playerid, -2709.731, 217.423, 4.179);
                }

                new msg[999];
                new dsname[MAX_PLAYER_NAME];
                new string[100];
                format(string, sizeof(string), "%s has just teleported to Tune 2 /Tune 2", dsname);
                SendClientMessageToAll(COLOR_YELLOW, string);

                GameTextForPlayer(playerid, "~B~Welcome To ~r~Tune 2", 3000, 4);
                return 1;
            }
            case 3:
            {
                if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
                {
                    SetVehiclePos(GetPlayerVehicleID(playerid), 2386.802, 1036.320, 10.280);
                }
                else
                {
                    SetPlayerPos(playerid, 2386.802, 1036.320, 10.280);
                }

                new msg[999];
                new dsname[MAX_PLAYER_NAME];
                new string[100];
                format(string, sizeof(string), "%s has just teleported to Tune 1 /Tune 3", dsname);
                SendClientMessageToAll(COLOR_YELLOW, string);

                GameTextForPlayer(playerid, "~B~Welcome To ~r~Tune 3", 3000, 4);
                return 1;
            }
            case 4:
            {
                if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
                {
                    SetVehiclePos(GetPlayerVehicleID(playerid), 2644.976, -2030.903, 13.554);
                }
                else
                {
                    SetPlayerPos(playerid, 2644.976, -2030.903, 13.554);
                }

                new msg[999];
                new dsname[MAX_PLAYER_NAME];
                new string[100];
                format(string, sizeof(string), "%s has just teleported to Tune 1 /Tune 4", dsname);
                SendClientMessageToAll(COLOR_YELLOW, string);

                GameTextForPlayer(playerid, "~B~Welcome To ~r~Tune 4", 3000, 4);
                return 1;
            }
        }
    }
    return 1;
}
Reply


Messages In This Thread
Teleport Command - by Windrush - 14.09.2012, 14:49
Re: Teleport Command - by sniperwars - 14.09.2012, 14:57
Re: Teleport Command - by Kirollos - 14.09.2012, 15:02
Re: Teleport Command - by d0nTtoucH - 29.05.2013, 15:38
Re: Teleport Command - by Astralis - 29.05.2013, 15:40
Re: Teleport Command - by d0nTtoucH - 29.05.2013, 15:46
Re: Teleport Command - by Xoomer - 29.05.2013, 16:19
Re: Teleport Command - by d0nTtoucH - 29.05.2013, 16:42
Re: Teleport Command - by Dragonsaurus - 29.05.2013, 16:49

Forum Jump:


Users browsing this thread: 1 Guest(s)