02.02.2012, 15:42
(
Последний раз редактировалось saringan_cs; 02.02.2012 в 18:28.
)
how I can tow the car without any CMD ? please help
// PRESSED(keys)
#define PRESSED(%0) \
(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
public OnPlayerKeyStateChange( playerid, newkeys, oldkeys )
{
if( PRESSED( KEY_FIRE ) )
{
if( GetVehicleModel( GetPlayerVehicleID( playerid ) ) != 525 ) return SendClientMessage( playerid, -1, "You are not in a tow truck" );
if(IsTrailerAttachedToVehicle( GetPlayerVehicleID( playerid ) ) )
{
DetachTrailerFromVehicle( GetPlayerVehicleID( playerid ) );
}
else
{
AttachTrailerToVehicle( GetPlayerVehicleID( playerid ), GetPlayerVehicleID( playerid ) );
}
}
return 1;
}