18.10.2010, 21:26
So, here's my script.
How am I supposed to get a vehicles interior so I can do this?
Sounds like basic knowledge, but still I have no idea.
I could of course make a variable for every vehicle to store the interior in, but that sounds a bit like overkill?
pawn Код:
dcmd_gotov(playerid, params[])
{
new id;
if(PlayerInfo[playerid][AdminLevel] < 2) return SendClientMessage(playerid, COLOR_GREY, "» You are not authorized to use this command.");
if(sscanf(params,"d",id)) return SendClientMessage(playerid, COLOR_GREY, "» USAGE: /gotov (Vehicle ID)");
if(id == INVALID_VEHICLE_ID) return SendClientMessage(playerid, COLOR_GREY, "» Invalid Vehicle ID.");
new Float:x, Float:y, Float:z;
GetVehiclePos(id, x, y, z);
new virt;
virt = GetVehicleVirtualWorld(id);
SetPlayerVirtualWorld(playerid, virt);
SetPlayerInterior(playerid, ...); // This line guys!
SetPlayerPos(playerid, x, y, z+2.5);
return 1;
}
Sounds like basic knowledge, but still I have no idea.
I could of course make a variable for every vehicle to store the interior in, but that sounds a bit like overkill?