25.07.2011, 10:58
Hi,
I want to get the InteriorID of the Vehicle and set it for the player. This is because of a command
Anyone know?
I want to get the InteriorID of the Vehicle and set it for the player. This is because of a command
pawn Код:
CMD:vgoto(playerid, params[]) {
if(player[playerid][pAdminLevel] < 3) return 0;
new id,
Float:vehPos[3];
if(sscanf(params, "d", id)) return SendClientMessage(playerid, COLOR_WHITE, "SYNTAX: /vgoto [vehicleID]");
if(id == INVALID_VEHICLE_ID) return SendClientMessage(playerid, COLOR_GREY, "Invalid vehicle ID!");
if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "Your already in a vehicle, Leave the vehicle first!");
if(HasVehicleGotDriver(id)) return SendClientMessage(playerid, COLOR_RED, "Someone is already in a that vehicle!");
GetVehiclePos(id, vehPos[0], vehPos[1], vehPos[2]);
SetPlayerPos(playerid, vehPos[0], vehPos[1], vehPos[2]);
PutPlayerInVehicle(playerid, id, 0);
SetPlayerVirtualWorld(playerid, GetVehicleVirtualWorld(id));
return 1;
}