this is !lockcar cmd
else if ( strcmp( cmd, "!lockcar", true ) == 0 )
{
tmp = strtok( cmdtext, idx );
if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_RED, "Please log-in to your account." );
else if ( !strlen( tmp ) ) SendClientMessage( playerid, COLOR_GREEN, "USAGE: !lockcar [VehicleID]" );
else if ( !IsVehicleExist( strval( tmp ) ) ) SendClientMessage( playerid, COLOR_GREEN, "Error: Unknown Vehicle" );
else if ( !IsVehicleOwnedShared( strval( tmp ), gPlayers[ playerid ] ) ) SendClientMessage( playerid, COLOR_GREEN, "You do not have the keys for that vehicle." );
else
{
format( szMsg, sizeof( szMsg ), "Locking vehicle:[ %d ]", strval( tmp ) );
SendClientMessage( playerid, COLOR_GREEN, szMsg );
SetVehicleDoorsStatus( strval( tmp ), 1 );
}
return 1;
}
this is !unlockcar cmd
else if ( strcmp( cmd, "!unlockcar", true ) == 0 )
{
tmp = strtok( cmdtext, idx );
if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_RED, "Please log-in to your account." );
else if ( !strlen( tmp ) ) SendClientMessage( playerid, COLOR_GREEN, "USAGE: !unlockcar [VehicleID]" );
else if ( !IsVehicleExist( strval( tmp ) ) ) SendClientMessage( playerid, COLOR_GREEN, "Error: Unknown Vehicle" );
else if ( !IsVehicleOwnedShared( strval( tmp ), gPlayers[ playerid ] ) ) SendClientMessage( playerid, COLOR_GREEN, "You do not have the keys for that vehicle." );
else
{
format( szMsg, sizeof( szMsg ), "Unlocking vehicle:[ %d ]", strval( tmp ) );
SendClientMessage( playerid, COLOR_GREEN, szMsg );
SetVehicleDoorsStatus( strval( tmp ),0 );
}
return 1;