16.09.2010, 18:17
I have a teleport command:
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.
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;
}
}
}
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.