Összedobtam gyorsan egyet, de nem tudom tesztelni, mert nem látom a saját szerverem. :O
#include < a_samp >
new iLastVeh[ MAX_PLAYERS ];
new Float: fSavedPos[ MAX_PLAYERS ][ 3 ];
public OnPlayerCommandText( playerid, cmdtext[ ] ) {
if( !strcmp( \"/sp\", cmdtext, true ) ) {
GetPlayerPos( playerid, fSavedPos[ playerid ][ 0 ], fSavedPos[ playerid ][ 1 ], fSavedPos[ playerid ][ 2 ] );
SendClientMessage( playerid, 0x00FF00AA, \"Pozíció elmentve!\" );
return 1;
}
if( !strcmp( \"/lp\", cmdtext, true ) ) {
if( GetPlayerState( playerid ) == PLAYER_STATE_ONFOOT ) {
PutPlayerInVehicle( playerid, iLastVeh[ playerid ], 0 );
}
SetPlayerPos( playerid, fSavedPos[ playerid ][ 0 ], fSavedPos[ playerid ][ 1 ], fSavedPos[ playerid ][ 2 ] );
SendClientMessage( playerid, 0x00FF00AA, \"Pozíció betöltve!\" );
return 1;
}
return 0;
}
public OnPlayerEnterVehicle( playerid, vehicleid ) {
iLastVeh[ playerid ] = vehicleid;
return 1;
}
public OnPlayerKeyStateChange( playerid, newkeys ) {
if( ( newkeys & KEY_FIRE ) && ( newkeys & KEY_WALK ) ) {
if( GetPlayerState( playerid ) == PLAYER_STATE_ONFOOT ) {
PutPlayerInVehicle( playerid, iLastVeh[ playerid ], 0 );
}
SetPlayerPos( playerid, fSavedPos[ playerid ][ 0 ], fSavedPos[ playerid ][ 1 ], fSavedPos[ playerid ][ 2 ] );
SendClientMessage( playerid, 0x00FF00AA, \"Pozíció betöltve!\" );
}
return 1;
}
//by ZeRo