hmm gf.. naja okay
unter new pInfo fügst du hinzu:
Float: SpawnX,
Float: SpawnY,
Float: SpawnZ,
Float: SpawnR,
SInterior,
SVirtualWorld,
du suchst OnPlayerLogin:
dort setzt du 6 sachen hinzu:
if( strcmp( key , "SpawnX" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][SpawnX] = floatstr( val ); }
if( strcmp( key , "SpawnY" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][SpawnY] = floatstr( val ); }
if( strcmp( key , "SpawnZ" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][SpawnZ] = floatstr( val ); }
if( strcmp( key , "SpawnR" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][SpawnR] = floatstr( val ); }
if( strcmp( key , "SInterior" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][SInterior] = strval( val ); }
if( strcmp( key , "SVirtualWorld" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][SVirtualWorld] = strval( val ); }
du suchst OnPlayerRegister:
dort setzt du 6 sachen hinzu:
format(var, 32, "SpawnX=%.1f\n",0.0);fwrite(hFile, var);
format(var, 32, "SpawnY=%.1f\n",0.0);fwrite(hFile, var);
format(var, 32, "SpawnZ=%.1f\n",0.0);fwrite(hFile, var);
format(var, 32, "SpawnR=%.1f\n",0.0);fwrite(hFile, var);
format(var, 32, "SInterior=%d\n",0);fwrite(hFile, var);
format(var, 32, "SVirtualWorld=%d\n",0);fwrite(hFile, var);
du suchst OnPlayerUpdateEx // je nach GF unterschiedlich:
dort setzt du 6 sachen hinzu:
new Float: p[4];
GetPlayerPos(playerid, p[0], p[1], p[2]);
GetPlayerFacingAngle(playerid, p[3]);
format(var, 32, "SpawnX=%.1f\n", p[0]);fwrite(hFile, var);
format(var, 32, "SpawnY=%.1f\n", p[1]);fwrite(hFile, var);
format(var, 32, "SpawnZ=%.1f\n", p[2]);fwrite(hFile, var);
format(var, 32, "SpawnR=%.1f\n", p[3]);fwrite(hFile, var);
format(var, 32, "SInterior=%d\n",GetPlayerInterior(playerid));fwrite(hFile, var);
format(var, 32, "SVirtualWorld=%d\n",GetPlayerVirtualWorld(playerid));fwrite(hFile, var);
und unter OnPlayerSpawn, da wo es dir passt:
SetPlayerPos(playerid, PlayerInfo[playerid][SpawnX], PlayerInfo[playerid][SpawnY], PlayerInfo[playerid][SpawnZ]);
SetPlayerFacingAngle(playerid, PlayerInfo[playerid][SpawnR]);
SetPlayerInterior(playerid, PlayerInfo[playerid][SInterior]);
SetPlayerVirtualWorld(playerid, PlayerInfo[playerid][SVirtualWorld]);
Ich hoffe es haben sich keine Fahler eingeschlichen.