25.12.2016, 18:37
Hello,
When i respawn / put the player into another vehicle, he gets in there, but he is invisible, it is like he isn't inside of the car, also he cant exit it, since he isn't really in there, but camera pos and controlling the vehicle works, just no character model to be seen.
Maybe anyone can tell me what possible reasons could be, because i have no clue.
onPlayerSpawn / onPlayerDeath ar empty, just saying. And before putting the player into the vehicle i check if he is spawned, if not i spawn him. I also make sure he isn't in spectatormode:
greetings Marcel
When i respawn / put the player into another vehicle, he gets in there, but he is invisible, it is like he isn't inside of the car, also he cant exit it, since he isn't really in there, but camera pos and controlling the vehicle works, just no character model to be seen.
Maybe anyone can tell me what possible reasons could be, because i have no clue.
onPlayerSpawn / onPlayerDeath ar empty, just saying. And before putting the player into the vehicle i check if he is spawned, if not i spawn him. I also make sure he isn't in spectatormode:
PHP код:
spawnPlayer(playerid)
{
TogglePlayerSpectating(playerid, 0);
if(!IsPlayerSpawned(playerid))
{
SpawnPlayer(playerid);
}
new mode = playerMode[playerid];
switch(mode)
{
case GAMEMODE_DM:
{
new newVehicle = CreateVehicle(411, modeState[playersMode][spawnX], modeState[playersMode][spawnY], modeState[playersMode][spawnZ], modeState[mode][spawnRotation], -1, -1, -1);
SetVehicleVirtualWorld(newVehicle, GetPlayerVirtualWorld(playerid));
PutPlayerInVehicle(playerid, newVehicle, 0);
}
//...
}
}