01.11.2014, 02:08
eu fiz uma adaptaзгo do Vspawner do samp ao meu gm estб tudo certo, mais eu queria que quando o admin trouxe-se o veiculo ele ja aparecesse dentro dele tentei fazer dessa forma:
porйm sem sucesso poderiam me ajudar ?
pawn Код:
SpawnVehicle_InfrontOfPlayer(playerid, vehiclemodel, color1, color2)
{
new Float:x,Float:y,Float:z;
new Float:facing;
new Float:distance;
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, facing);
new Float:size_x,Float:size_y,Float:size_z;
GetVehicleModelInfo(vehiclemodel, VEHICLE_MODEL_INFO_SIZE, size_x, size_y, size_z);
distance = size_x + 0.5;
x += (distance * floatsin(-facing, degrees));
y += (distance * floatcos(-facing, degrees));
facing += 90.0;
if(facing > 360.0) facing -= 360.0;
PutPlayerInVehicle(playerid, vehicleid, 0);
return CarroAdmin1[playerid] = CreateVehicle(vehiclemodel, x, y, z + (size_z * 0.25), facing, color1, color2, -1);
}