[Ajuda] Ao Spawnar o carro o admin ja aparecer dentro dele - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Ao Spawnar o carro o admin ja aparecer dentro dele (
/showthread.php?tid=544269)
Ao Spawnar o carro o admin ja aparecer dentro dele -
4G4M3N0M - 01.11.2014
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:
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);
}
porйm sem sucesso poderiam me ajudar ?
Re: Ao Spawnar o carro o admin ja aparecer dentro dele -
Miineiro - 01.11.2014
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;
CarroAdmin1[playerid] = CreateVehicle(vehiclemodel, x, y, z + (size_z * 0.25), facing, color1, color2, -1);
PutPlayerInVehicle(playerid, CarroAdmin1[playerid], 0);
return 1;
}
Tente.
Respuesta: Ao Spawnar o carro o admin ja aparecer dentro dele -
4G4M3N0M - 01.11.2014
Funcionou valeu mesmo +rep!