CMD:sp(playerid){ new Float:Pos[4]; GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]); GetPlayerFacingAngle(playerid, Pos[3]); SetPVarFloat(playerid,\"PosX\", Pos[0]); SetPVarFloat(playerid,\"PosY\", Pos[1]); SetPVarFloat(playerid,\"PosZ\", Pos[2]); SetPVarFloat(playerid,\"PosA\", Pos[3]); SendClientMessage(playerid, -1, \"Poziciód elmentve!\"); return 1;}CMD:lp(playerid){ SetPlayerPos(playerid, GetPVarFloat(playerid,\"PosX\"), GetPVarFloat(playerid,\"PosY\"), GetPVarFloat(playerid,\"PosZ\")); SetPlayerFacingAngle(playerid, GetPVarFloat(playerid,\"PosA\")); SendClientMessage(playerid, -1, \"Utolsó mentett poziciód betöltve!\"); return 1;}
public OnPlayerSpawn(playerid){new name[MAX_PLAYER_NAME]; new Float:fPos[ 3 ], Interior; new file[128]; GetPlayerName( playerid, name, MAX_PLAYER_NAME ); format( file, sizeof( file ), \"pos/%s.ini\", name ); if( dini_Exists( file ) ) { fPos[ 0 ] = dini_Float( file, \"KooX\" ); fPos[ 1 ] = dini_Float( file, \"KooY\" ); fPos[ 2 ] = dini_Float( file, \"KooZ\" ); Interior = dini_Int(file, \"KooI\"); SetPlayerPos( playerid, fPos[ 0 ], fPos[ 1 ], fPos[ 2 ] ); SetPlayerInterior(playerid, Interior); } else { SetPlayerPos( playerid, //ahol kezd); SetPlayerInterior(playerid, 0); }return 1;}public OnPlayerDisconnect(playerid, reason){new name[MAX_PLAYER_NAME]; new Float:fPos[ 3 ], Interior;Interior = GetPlayerInterior(playerid); GetPlayerPos( playerid, fPos[ 0 ], fPos[ 1 ], fPos[ 2 ] ); GetPlayerName( playerid, name, MAX_PLAYER_NAME ); format( file, sizeof( file ), \"pos/%s.ini\", name ); if( !dini_Exists( file ) ) { dini_Create( file ); dini_FloatSet(file, \"KooX\", fPos[ 0 ] ); dini_FloatSet(file, \"KooY\", fPos[ 1 ] ); dini_FloatSet(file, \"KooZ\", fPos[ 2 ] ); dini_IntSet(file, \"KooI\", Interior); } else { dini_FloatSet(file, \"KooX\", fPos[ 0 ] ); dini_FloatSet(file, \"KooY\", fPos[ 1 ] ); dini_FloatSet(file, \"KooZ\", fPos[ 2 ] ); dini_IntSet(file, \"KooI\", Interior); }return 1;}