Hey,
warum spawnt mein Spieler nicht in meinem Auto? Der ist iwie in der Luft gebuggt, und wenn ich auf ein Textdraw fahre, geht die Kamera zu meinem Spieler (vorher beim Auto).
public OnPlayerSpawn(playerid)
{
new string[128];
format(string,128,"%s",MapName);
SendClientMessage(playerid,0xFDD700FF,string);
SpawnInVehicle(playerid,SpawnPointVeh[playerid],SpawnPointX[playerid], SpawnPointY[playerid], SpawnPointZ[playerid], SpawnPointA[playerid],0,0,-1,-1,-1);
return 1;
}
stock SpawnInVehicle(playerid, model, Float:pox, Float:poy, Float:poz, Float:poa, dimension, interior, c1, c2, spawn_d) {
if(model==0||pox==0||poy==0){
pox = SpawnPointX[0];
poy = SpawnPointY[0];
poz += 2;
}
if(pveh[playerid]>0) DestroyVehicle(pveh[playerid]);
pveh[playerid] = CreateVehicle(model, pox, poy, poz, poa, c1, c2, spawn_d);
PutPlayerInVehicle(playerid, pveh[playerid], 0);
LinkVehicleToInterior(pveh[playerid], interior);
SetVehicleVirtualWorld(pveh[playerid], dimension);
SetPlayerVirtualWorld(playerid, dimension);
SetCameraBehindPlayer(playerid);
}
Hier mal eine Grafische Darstellung: