/enter that brings you in the car if in a car, or on foot if on foot.
#1

I have a teleport command:

pawn Код:
}
    if(strcmp(cmd, "/entersd", true) == 0)
    {
        if(IsPlayerInRangeOfPoint(playerid, 5, 1803.1401,-1727.0227,13.5393))
        {
          if(gTeam[playerid] == 5)
            {
            new vehicleid = GetPlayerVehicleID(playerid);
            SetVehiclePos(vehicleid, 1803.3407,-1715.1450,13.5341);
            SetPlayerPos(playerid, 1803.3407,-1715.1450,13.5341);
            SendClientMessage(playerid, COLOR_GREY, "Welcome to the SASD HQ, /exitsd to leave.");
            return 1;
          }
          else
            {
              SendClientMessage(playerid, COLOR_GREY, "You are not SASD.");
              return 1;
            }
        }
    }
Except it send you with the car and you end up on top of it, as I have SetPlayerPos as well as SetVehiclePos.
I originally only had SetVehiclePos but people on foot couldn't do the command.
How do I make it so that if player is in a vehicle, it does SetVehiclePos, if on foot, SetPlayerPos.
Reply


Messages In This Thread
/enter that brings you in the car if in a car, or on foot if on foot. - by Garc1a - 16.09.2010, 18:17
Re: /enter that brings you in the car if in a car, or on foot if on foot. - by CAR - 16.09.2010, 18:22
Re: /enter that brings you in the car if in a car, or on foot if on foot. - by [XST]O_x - 16.09.2010, 18:23

Forum Jump:


Users browsing this thread: 1 Guest(s)