Vehicle teleport
#1

Hello, I was having a problem with this.. I tried many ways and it failed.. I need to make it where it will teleport you if your in a vehicle.. Or on foot.

pawn Код:
if(strcmp("/vipgarage", cmdtext, true) == 0)
    {
        if(IsPlayerInRangeOfPoint(playerid, 3.0, 1263.40527344,-1673.39611816,12.74134350))//Garage
        {
            SetPlayerPos(playerid, 1145.54235840,-1693.51977539,1587.66223145);
            SetPlayerInterior(playerid, 0);
            GameTextForPlayer( playerid, "You have Entered the VIP Garage!", 3000, 1 );
        }
        else if(IsPlayerInRangeOfPoint(playerid, 3.0, 1145.54235840,-1693.51977539,1587.66223145))//Room
        {
            SetPlayerPos(playerid, 1263.40527344,-1673.39611816,12.74134350);
            SetPlayerInterior(playerid, 0);
            GameTextForPlayer( playerid, "You have Exited the VIP Garage!", 3000, 1 );
        }
    return 1;
}
Reply
#2

pawn Код:
if(strcmp("/vipgarage", cmdtext, true) == 0)
{
    if(IsPlayerInRangeOfPoint(playerid, 3.0, 1263.40527344,-1673.39611816,12.74134350))//Garage
    {
        if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
        {
            SetVehiclePos(GetPlayerVehicleID(playerid), 1145.54235840,-1693.51977539,1587.66223145);
        }
        else
        {
            SetPlayerPos(playerid, 1145.54235840,-1693.51977539,1587.66223145);
        }
        SetPlayerInterior(playerid, 0);
        GameTextForPlayer( playerid, "You have Entered the VIP Garage!", 3000, 1 );
    }
    else if(IsPlayerInRangeOfPoint(playerid, 3.0, 1145.54235840,-1693.51977539,1587.66223145))//Room
    {
        if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
        {
            SetVehiclePos(GetPlayerVehicleID(playerid),1263.40527344,-1673.39611816,12.74134350);
        }
        else
        {
            SetPlayerPos(playerid, 1263.40527344,-1673.39611816,12.74134350);
        }
        SetPlayerInterior(playerid, 0);
        GameTextForPlayer( playerid, "You have Exited the VIP Garage!", 3000, 1 );
    }
    return 1;
}
Reply
#3

Thank you very much
Reply
#4

Quote:
Originally Posted by Jacob_T_Harden
Посмотреть сообщение
Thank you very much
No Problem.
Reply
#5

pawn Код:
if(strcmp("/mcg", cmdtext, true) == 0)
    {
        if(IsPlayerInRangeOfPoint(playerid, 3.0, -899.6533,1557.4154,25.8014,88.2856))
        {
            if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
            {
                SetVehiclePos(GetPlayerVehicleID(playerid), -936.50579833984, 1539.9505615234, 21.346599578857);
            }
            else
            {
                SetPlayerPos(playerid, -936.50579833984, 1539.9505615234, 21.346599578857);
            }
            SendClientMessageToPlayer(playerid, 0xFFFFFFFF, Sa sisenesid {FFFFF} Mongols MC garaazi.);
        }
        else if(IsPlayerInRangeOfPoint(playerid), 3.0, -936.50579833984, 1539.9505615234, 21.346599578857);
        {
            if(GetPlayerState(playerid == PLAYER_STATE_DRIVER)
            {
                SetVehiclePos(GetPlayerVehicleID(playerid), -899.6533,1557.4154,25.8014,88.2856);
            }
            else
            {
                SetPlayerPos(playerid, -899.6533,1557.4154,25.8014,88.2856);
            }
            SendClientMessageToPlayer(playerid, 0xFFFFFFFF, Sa lahkusid {FFFFF} Mongols MC garaazist.);
        }
        return 1;
    }
My compile window crashes, when im trying to compile my GM. Any help?
Reply
#6

pawn Код:
if(strcmp("/mcg", cmdtext, true) == 0)
    {
        if(IsPlayerInRangeOfPoint(playerid, 3.0, -899.6533,1557.4154,25.8014,88.2856))
        {
            if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
            {
                SetVehiclePos(GetPlayerVehicleID(playerid), -936.50579833984, 1539.9505615234, 21.346599578857);
            }
            else
            {
                SetPlayerPos(playerid, -936.50579833984, 1539.9505615234, 21.346599578857);
            }
            SendClientMessageToPlayer(playerid, 0xFFFFFFFF,"Sa sisenesid {FFFFF} Mongols MC garaazi.");
        }
        else if(IsPlayerInRangeOfPoint(playerid), 3.0, -936.50579833984, 1539.9505615234, 21.346599578857);
        {
            if(GetPlayerState(playerid == PLAYER_STATE_DRIVER)
            {
                SetVehiclePos(GetPlayerVehicleID(playerid), -899.6533,1557.4154,25.8014,88.2856);
            }
            else
            {
                SetPlayerPos(playerid, -899.6533,1557.4154,25.8014,88.2856);
            }
            SendClientMessageToPlayer(playerid, 0xFFFFFFFF,"Sa lahkusid {FFFFF} Mongols MC garaazist");
        }
        return 1;
    }
Try it
Reply
#7

C:\Users\Kьlaline\Desktop\Las Venturas Roleplay\Raven's Roleplay 0.3c\gamemodes\larp.pwn(24160) : warning 202: number of arguments does not match definition
C:\Users\Kьlaline\Desktop\Las Venturas Roleplay\Raven's Roleplay 0.3c\gamemodes\larp.pwn(24170) : error 017: undefined symbol "SendClientMessageToPlayer"
C:\Users\Kьlaline\Desktop\Las Venturas Roleplay\Raven's Roleplay 0.3c\gamemodes\larp.pwn(24172) : warning 202: number of arguments does not match definition
C:\Users\Kьlaline\Desktop\Las Venturas Roleplay\Raven's Roleplay 0.3c\gamemodes\larp.pwn(24172) : warning 202: number of arguments does not match definition
C:\Users\Kьlaline\Desktop\Las Venturas Roleplay\Raven's Roleplay 0.3c\gamemodes\larp.pwn(24172) : warning 202: number of arguments does not match definition
C:\Users\Kьlaline\Desktop\Las Venturas Roleplay\Raven's Roleplay 0.3c\gamemodes\larp.pwn(24172) : warning 202: number of arguments does not match definition
C:\Users\Kьlaline\Desktop\Las Venturas Roleplay\Raven's Roleplay 0.3c\gamemodes\larp.pwn(24172) : warning 206: redundant test: constant expression is non-zero
C:\Users\Kьlaline\Desktop\Las Venturas Roleplay\Raven's Roleplay 0.3c\gamemodes\larp.pwn(24172) : error 036: empty statement
C:\Users\Kьlaline\Desktop\Las Venturas Roleplay\Raven's Roleplay 0.3c\gamemodes\larp.pwn(24175) : error 001: expected token: ")", but found "{"
C:\Users\Kьlaline\Desktop\Las Venturas Roleplay\Raven's Roleplay 0.3c\gamemodes\larp.pwn(24176) : warning 202: number of arguments does not match definition
C:\Users\Kьlaline\Desktop\Las Venturas Roleplay\Raven's Roleplay 0.3c\gamemodes\larp.pwn(24180) : warning 202: number of arguments does not match definition
C:\Users\Kьlaline\Desktop\Las Venturas Roleplay\Raven's Roleplay 0.3c\gamemodes\larp.pwn(24182) : error 017: undefined symbol "SendClientMessageToPlayer"


Gives errors now..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)